summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfried JEANNIARD <willou.com@gmail.com>2016-04-29 01:00:34 +0200
committerWilfried JEANNIARD <willou.com@gmail.com>2016-04-29 01:00:34 +0200
commit96b128f740a053cea22a7cc99ff9490973c24a8c (patch)
treea34f4a6a163e355e96815adeb3e0d55032e7add7
parentf986892d1b96da97888c796e69000982f2c65491 (diff)
downloadchef-96b128f740a053cea22a7cc99ff9490973c24a8c.tar.gz
fixes matches
-rw-r--r--lib/chef/knife/cookbook_site_install.rb6
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