diff --git a/examples/example_3/rakefile_helper.rb b/examples/example_3/rakefile_helper.rb index f1f51d4..0e249b7 100644 --- a/examples/example_3/rakefile_helper.rb +++ b/examples/example_3/rakefile_helper.rb @@ -141,7 +141,7 @@ module RakefileHelpers report command_string output = `#{command_string}`.chomp report(output) if verbose && !output.nil? && !output.empty? - if !$?.exitstatus.zero? && raise_on_fail + if !$?.nil? && !$?.exitstatus.zero? && raise_on_fail raise "Command failed. (Returned #{$?.exitstatus})" end output diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index d4335ec..97c416f 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -173,7 +173,7 @@ module RakefileHelpers report command_string if $verbose output = `#{command_string}`.chomp report(output) if $verbose && !output.nil? && !output.empty? - raise "Command failed. (Returned #{$?.exitstatus})" if !$?.exitstatus.zero? && !ok_to_fail + raise "Command failed. (Returned #{$?.exitstatus})" if !$?.nil? && !$?.exitstatus.zero? && !ok_to_fail output end