Fix broken optimize image command.
This commit is contained in:
parent
a1d04a7a9a
commit
ddc8abf9d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue