mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Fix broken optimize image command.
This commit is contained in:
@ -215,7 +215,11 @@ class OptimizedImage < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.convert_with(instructions, to)
|
||||
return false unless system(instructions.join(" "), '&> /dev/null')
|
||||
begin
|
||||
Discourse::Utils.execute_command(*instructions)
|
||||
rescue
|
||||
return false
|
||||
end
|
||||
|
||||
ImageOptim.new.optimize_image!(to)
|
||||
true
|
||||
|
Reference in New Issue
Block a user