1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Rearrange details to always print if given, no matter if another msg added or not.

Print output on failures no matter if verbose or not.
Enforce that HEX comparisons are unsigned comparisons.
This commit is contained in:
Mark VanderVoord
2022-04-19 16:21:04 -04:00
parent b9e9268d92
commit 0df1d442cb
5 changed files with 94 additions and 17 deletions

View File

@@ -173,7 +173,7 @@ module RakefileHelpers
def execute(command_string, ok_to_fail = false)
report command_string if $verbose
output = `#{command_string}`.chomp
report(output) if $verbose && !output.nil? && !output.empty?
report(output) if ($verbose && !output.nil? && !output.empty?) || (!$?.nil? && !$?.exitstatus.zero? && !ok_to_fail)
raise "Command failed. (Returned #{$?.exitstatus})" if !$?.nil? && !$?.exitstatus.zero? && !ok_to_fail
output
end