mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:01:14 +08:00
rescue failure to backup assets
This commit is contained in:
@ -176,7 +176,13 @@ task 'assets:precompile' => 'assets:precompile:before' do
|
|||||||
manifest.send :save
|
manifest.send :save
|
||||||
|
|
||||||
if backup_path=ENV["BACKUP_ASSET_PATH"]
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user