mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't use backticks that take in inputs.
This commit is contained in:
@@ -215,8 +215,7 @@ class OptimizedImage < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.convert_with(instructions, to)
|
||||
`#{instructions.join(" ")} &> /dev/null`
|
||||
return false if $?.exitstatus != 0
|
||||
return false unless system(instructions.join(" "), '&> /dev/null')
|
||||
|
||||
ImageOptim.new.optimize_image!(to)
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user