summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeWaRs1206 <iturbide.emmanuel@gmail.com>2015-06-25 15:07:53 +0200
committerDeWaRs1206 <iturbide.emmanuel@gmail.com>2015-06-25 15:07:53 +0200
commitdf7db9caca359ce88027a530bece3ff7b6fb92ed (patch)
tree790f62f73e45dc360a2f90f4a3a45f43ba30a72d
parentab34e3cd83d545b5da19113d723eeebcab1e77e2 (diff)
downloadchef-df7db9caca359ce88027a530bece3ff7b6fb92ed.tar.gz
Use Mixlib::Shellout instead of Chef::Mixin::Command
Using C:\Users\Administrator>chef-solo -i 30 -s 5 -c C:/monsoon/solo.rb -j http://foo-bar/get-run -r http://foo-bar.com/cookbooks.tar.gz failled with error : [2015-06-25T15:01:52+02:00] DEBUG: ---- End output of tar zxvf C:/chef/recipes.t gz -C C:/chef ---- C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:140:in `block in ou tput_of_command': undefined method `exitstatus' for nil:NilClass (NoMethodError) from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in `chdir' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in `output_of_command' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:101:in `run_command_and_return_stdout_stderr' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:79:in `run_command' from C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:217 :in `reconfigure' from C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:58:in `r un' from C:/opscode/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (requi red)>' from C:/opscode/chef/bin/chef-solo:63:in `load' from C:/opscode/chef/bin/chef-solo:63:in `<main>' using Mixlib::ShellOut instead of Chef::Mixin::Command solved the issue
-rw-r--r--lib/chef/application/solo.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index dd09d65b42..1228fc4148 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -214,7 +214,8 @@ class Chef::Application::Solo < Chef::Application
FileUtils.mkdir_p(recipes_path)
tarball_path = File.join(recipes_path, 'recipes.tgz')
fetch_recipe_tarball(Chef::Config[:recipe_url], tarball_path)
- Chef::Mixin::Command.run_command(:command => "tar zxvf #{tarball_path} -C #{recipes_path}")
+ tarcommand = Mixlib::ShellOut.new("tar zxvf #{tarball_path} -C #{recipes_path}")
+ tarcommand.run_command
end
# json_attribs shuld be fetched after recipe_url tarball is unpacked.