summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pereira <pereira.m@gmail.com>2015-09-25 12:11:42 -0400
committerLamont Granquist <lamont@scriptkiddie.org>2015-10-24 20:25:11 -0700
commitf13cda49551524c446b53ba2f4a2c503ba45e922 (patch)
tree5c782007f587478e250c6d42dca22728407c14e4
parent1f3279943bd6f29ae4476c36b728cd3e7f070843 (diff)
downloadchef-f13cda49551524c446b53ba2f4a2c503ba45e922.tar.gz
Fix cookbook installation from supermarket on windows
- Fixes https://tickets.opscode.com/browse/CHEF-3394 by adding the `--force-local` option to tar - Might fix #1753 with the added double quotes Proof of the fix: ![Proof of the fix](http://imgur.com/MOvHdPD.png)
-rw-r--r--lib/chef/knife/cookbook_site_install.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/cookbook_site_install.rb b/lib/chef/knife/cookbook_site_install.rb
index aee8b7fa94..0e9a90951b 100644
--- a/lib/chef/knife/cookbook_site_install.rb
+++ b/lib/chef/knife/cookbook_site_install.rb
@@ -142,7 +142,7 @@ class Chef
def extract_cookbook(upstream_file, version)
ui.info("Uncompressing #{@cookbook_name} version #{version}.")
# FIXME: Detect if we have the bad tar from git on Windows: https://github.com/opscode/chef/issues/1753
- shell_out!("tar zxvf #{convert_path upstream_file}", :cwd => @install_path)
+ shell_out!("tar zxvf \"#{convert_path upstream_file}\" --force-local", :cwd => @install_path)
end
def clear_existing_files(cookbook_path)