summaryrefslogtreecommitdiff
path: root/lib/chef/knife/core/cookbook_scm_repo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/core/cookbook_scm_repo.rb')
-rw-r--r--lib/chef/knife/core/cookbook_scm_repo.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/core/cookbook_scm_repo.rb b/lib/chef/knife/core/cookbook_scm_repo.rb
index 38f432e5bb..6e1f05d7a8 100644
--- a/lib/chef/knife/core/cookbook_scm_repo.rb
+++ b/lib/chef/knife/core/cookbook_scm_repo.rb
@@ -58,7 +58,7 @@ class Chef
exit 1
end
cmd = git("status --porcelain")
- if cmd.stdout =~ DIRTY_REPO
+ if cmd.stdout.match?(DIRTY_REPO)
ui.error "You have uncommitted changes to your cookbook repo (#{repo_path}):"
ui.msg cmd.stdout
ui.info "Commit or stash your changes before importing cookbooks"