Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

fix NoMethodError: undefined method `zero?' for nil:NilClass #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/yui/compressor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down