mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:11:10 +08:00
Fix broken optimize image command.
This commit is contained in:
@ -215,7 +215,11 @@ class OptimizedImage < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.convert_with(instructions, to)
|
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)
|
ImageOptim.new.optimize_image!(to)
|
||||||
true
|
true
|
||||||
|
Reference in New Issue
Block a user