diff options
author | Wilfried JEANNIARD <willou.com@gmail.com> | 2016-05-03 21:32:26 +0200 |
---|---|---|
committer | Wilfried JEANNIARD <willou.com@gmail.com> | 2016-05-03 21:32:26 +0200 |
commit | aea8d8c80caeb6547b4520f85fa39e31d06c1598 (patch) | |
tree | 3b1658b69a5241c09202b43da54d218a6168d5ce | |
parent | 96b128f740a053cea22a7cc99ff9490973c24a8c (diff) | |
download | chef-aea8d8c80caeb6547b4520f85fa39e31d06c1598.tar.gz |
code cleanup
-rw-r--r-- | lib/chef/knife/cookbook_site_install.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/knife/cookbook_site_install.rb b/lib/chef/knife/cookbook_site_install.rb index 8f86945fcc..55ddf728f0 100644 --- a/lib/chef/knife/cookbook_site_install.rb +++ b/lib/chef/knife/cookbook_site_install.rb @@ -143,13 +143,12 @@ class Chef ui.info("Uncompressing #{@cookbook_name} version #{version}.") extract_command = "tar zxvf \"#{convert_path upstream_file}\"" if Chef::Platform.windows? - # FIXED: Detect if we have the bad tar from git on Windows: https://github.com/opscode/chef/issues/1753 tar_version = shell_out("tar --version").stdout.tr("\n", " ") if tar_version =~ /GNU tar/ - ui.info("GNU tar detected") + ui.debug("GNU tar detected, adding --force-local") extract_command << " --force-local" - elsif tar_version =~ /bsdtar/ - ui.info("BSD tar detected") + else + ui.debug("non-GNU tar detected, not adding --force-local") end end shell_out!(extract_command, :cwd => @install_path) |