summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Bùˆnemann <buenemann@louis.info>2013-06-10 01:34:40 +0200
committerBryan McLellan <btm@opscode.com>2013-06-17 14:07:20 -0700
commit6f0296cb2ff48210222d25468bf854f91f9fd124 (patch)
tree266250cf70dd0a408218b681bf52c33e59c6c024
parent4886a8d160dfdcedd6960e7a5e89fd9514c44769 (diff)
downloadchef-6f0296cb2ff48210222d25468bf854f91f9fd124.tar.gz
CHEF-4259: Fix unpacking recipes with non-gnu tar
This probably isn't enough to handle every ancient version of tar, but at least it fixes unpacking on SmartOS which is based on fairly recent illumos. Also related to CHEF-1201.
-rw-r--r--lib/chef/application/solo.rb2
-rw-r--r--spec/unit/application/solo_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index b2fe91baed..7e316dc260 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -215,7 +215,7 @@ class Chef::Application::Solo < Chef::Application
f.write(r.read)
end
end
- Chef::Mixin::Command.run_command(:command => "tar zxvfC #{path} #{recipes_path}")
+ Chef::Mixin::Command.run_command(:command => "tar zxvf #{path} -C #{recipes_path}")
end
end
diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb
index 96c89a37a6..07598dd01c 100644
--- a/spec/unit/application/solo_spec.rb
+++ b/spec/unit/application/solo_spec.rb
@@ -136,7 +136,7 @@ describe Chef::Application::Solo do
end
it "should untar the target file to the parent of the cookbook path" do
- Chef::Mixin::Command.should_receive(:run_command).with({:command => "tar zxvfC #{Dir.tmpdir}/chef-solo/recipes.tgz #{Dir.tmpdir}/chef-solo"}).and_return(true)
+ Chef::Mixin::Command.should_receive(:run_command).with({:command => "tar zxvf #{Dir.tmpdir}/chef-solo/recipes.tgz -C #{Dir.tmpdir}/chef-solo"}).and_return(true)
@app.reconfigure
end
end