lib/awestruct/extensions/minify.rb in awestruct-0.5.3 vs lib/awestruct/extensions/minify.rb in awestruct-0.5.4.beta1
- old
+ new
@@ -115,10 +115,10 @@
end
end
def pngcrush(page, input)
filename = page.source_path
- cmd = Shellwords.escape("pngcrush #{filename} /tmp/pngcrush")
+ cmd = "pngcrush " + Shellwords.escape("#{filename}") + " /tmp/pngcrush"
`#{cmd}`
if $?.exitstatus != 0
raise "Failed to execute pngcrush: #{cmd}"
end
output = File.read('/tmp/pngcrush')