Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryguy committed Jan 27, 2021
1 parent 3020e33 commit c2b02e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/gems/pending/util/miq-ipmi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ 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}"
result = err.result
return err.to_s if continue_on_error == true && result.exit_status == 1

raise "Command:<#{result.command_line}> exited with status:<#{result.exit_status}>\nCommand output:\n#{err}"
end
end

Expand Down

0 comments on commit c2b02e9

Please sign in to comment.