diff options
-rw-r--r-- | lib/chef/knife/cookbook_site_install.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/knife/cookbook_site_install.rb b/lib/chef/knife/cookbook_site_install.rb index ae688c723a..8f86945fcc 100644 --- a/lib/chef/knife/cookbook_site_install.rb +++ b/lib/chef/knife/cookbook_site_install.rb @@ -144,11 +144,11 @@ class Chef 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 /GNU tar/.match(tar_version) + tar_version = shell_out("tar --version").stdout.tr("\n", " ") + if tar_version =~ /GNU tar/ ui.info("GNU tar detected") extract_command << " --force-local" - elsif /bsdtar/.match(tar_version) + elsif tar_version =~ /bsdtar/ ui.info("BSD tar detected") end end |