From dc3a648990953a270953f9c14208638dd2315679 Mon Sep 17 00:00:00 2001 From: Tomas Valent Date: Wed, 13 Jan 2016 17:17:33 +0000 Subject: [PATCH] fix NoMethodError: undefined method `zero?' for nil:NilClass --- lib/yui/compressor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/yui/compressor.rb b/lib/yui/compressor.rb index 515ccf8..b588732 100644 --- a/lib/yui/compressor.rb +++ b/lib/yui/compressor.rb @@ -98,7 +98,9 @@ def compress(stream_or_string) tempfile.close! end - if $?.exitstatus.zero? + if $?.exitstatus.nil? + raise RuntimeError, "Command didn't execute: #{full_command}" + elsif $?.exitstatus.zero? output else # Bourne shells tend to blow up here when the command fails, usually