Skip to content

Commit

Permalink
Merge pull request #107 from chrischillibean/master
Browse files Browse the repository at this point in the history
[ COOK-4124] update-alternatives fails to run
  • Loading branch information
carmstrong committed Dec 19, 2013
2 parents b9e1df2 + 685369e commit 70fc07c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/alternatives.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
description = "Set alternative for #{cmd}"
converge_by(description) do
Chef::Log.debug "Setting alternative for #{cmd}"
set_cmd = shell_out("update-alternatives --set #{cmd} #{alt_path}").run_command
set_cmd = shell_out("update-alternatives --set #{cmd} #{alt_path}")
unless set_cmd.exitstatus == 0
Chef::Application.fatal!(%Q[ set alternative failed ])
end
Expand All @@ -66,7 +66,7 @@
action :unset do
new_resource.bin_cmds.each do |cmd|
alt_path = "#{new_resource.java_location}/bin/#{cmd}"
cmd = shell_out("update-alternatives --remove #{cmd} #{alt_path}").run_command
cmd = shell_out("update-alternatives --remove #{cmd} #{alt_path}")
if cmd.exitstatus == 0
new_resource.updated_by_last_action(true)
end
Expand Down

0 comments on commit 70fc07c

Please sign in to comment.