lib/chef/knife/cook.rb in jgrevich-knife-solo-0.1.1 vs lib/chef/knife/cook.rb in jgrevich-knife-solo-0.1.2
- old
+ new
@@ -118,10 +118,10 @@
def cook
logging_arg = "-l debug" if config[:verbosity] > 0
stream_command <<-BASH
- chef-solo -c #{chef_path}/solo.rb \
+ #{"sudo -E" if sudo_available?} chef-solo -c #{chef_path}/solo.rb \
-j #{chef_path}/#{node_config} \
#{logging_arg}
BASH
end
end