Skip to content

Commit

Permalink
Let stream_command add sudo if supported
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Feb 10, 2012
1 parent ba27ab8 commit 9f7b91d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/chef/knife/cook.rb
Expand Up @@ -109,15 +109,11 @@ def check_chef_version
def cook
logging_arg = "-l debug" if config[:verbosity] > 0

command = []
command << "sudo" unless windows_compat?
command << <<-BASH
stream_command <<-BASH
chef-solo -c #{chef_path}/solo.rb \
-j #{chef_path}/#{node_config} \
#{logging_arg}
BASH
command = command.join(' ')
stream_command command
end
end
end
Expand Down

0 comments on commit 9f7b91d

Please sign in to comment.