rescue failure to backup assets
This commit is contained in:
parent
e14a63cc88
commit
bc96f0fe78
|
@ -176,7 +176,13 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
|||
manifest.send :save
|
||||
|
||||
if backup_path=ENV["BACKUP_ASSET_PATH"]
|
||||
FileUtils.cp_r("#{Rails.root}/public/assets/.", backup_path)
|
||||
begin
|
||||
FileUtils.cp_r("#{Rails.root}/public/assets/.", backup_path)
|
||||
rescue => e
|
||||
STDERR.puts "Failed to backup assets to #{backup_path}"
|
||||
STDERR.puts e
|
||||
STDERR.puts e.backtrace
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue