mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
rescue failure to backup assets
This commit is contained in:
parent
e14a63cc88
commit
bc96f0fe78
1 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue