Skip to content

Commit

Permalink
convert to shell_out(), fixes #116
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoriz committed Dec 22, 2024
1 parent 79e696d commit 711a931
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions providers/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,8 @@ def execute_install_script(install_script)
action :nothing
end.run_action(:run)
else
upgrade_command = Mixlib::ShellOut.new(install_script, timeout: new_resource.install_timeout)
upgrade_command.run_command
if upgrade_command.exitstatus != 0
upgrade_command = shell_out(install_script, timeout: new_resource.install_timeout)
if upgrade_command.error?
raise "Error updating #{chef_infra_product_name}. exit code: #{upgrade_command.exitstatus}.\nSTDERR: #{upgrade_command.stderr}\nSTDOUT: #{upgrade_command.stdout}"
end
end
Expand Down

0 comments on commit 711a931

Please sign in to comment.