diff --git a/lib/gems/pending/util/miq-ipmi.rb b/lib/gems/pending/util/miq-ipmi.rb index 9d9da8b7..95ca7cf4 100644 --- a/lib/gems/pending/util/miq-ipmi.rb +++ b/lib/gems/pending/util/miq-ipmi.rb @@ -185,9 +185,10 @@ def run_command(ipmi_cmd, *args) command_args[nil] = args unless args.empty? begin - return AwesomeSpawn.run!("ipmitool", :params => command_args, :combined_output => true).output + AwesomeSpawn.run!("ipmitool", :params => command_args, :combined_output => true).output rescue AwesomeSpawn::CommandResultError => err return err.to_s if continue_on_error == true && err.exit_status == 1 + raise "Command:<#{err.command_line}> exited with status:<#{err.exit_status}>\nCommand output:\n#{err}" end end