mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Protect against nil return codes in rakefiles
This commit is contained in:
@@ -141,7 +141,7 @@ module RakefileHelpers
|
|||||||
report command_string
|
report command_string
|
||||||
output = `#{command_string}`.chomp
|
output = `#{command_string}`.chomp
|
||||||
report(output) if verbose && !output.nil? && !output.empty?
|
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})"
|
raise "Command failed. (Returned #{$?.exitstatus})"
|
||||||
end
|
end
|
||||||
output
|
output
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ module RakefileHelpers
|
|||||||
report command_string if $verbose
|
report command_string if $verbose
|
||||||
output = `#{command_string}`.chomp
|
output = `#{command_string}`.chomp
|
||||||
report(output) if $verbose && !output.nil? && !output.empty?
|
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
|
output
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user