summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJos Backus <jos@catnook.com>2016-02-16 12:01:27 -0800
committerJos Backus <jos@catnook.com>2016-02-17 11:03:20 -0800
commitcca86f9858661cc2433b0601c4889a68bbade1e2 (patch)
tree52bfa44a6e0dc82bcbe505f4c1be0f8ba4cc2747
parent7dde5d9e6fc1b25f43198b9b3beb08b2684af0cb (diff)
downloadchef-cca86f9858661cc2433b0601c4889a68bbade1e2.tar.gz
Add warning as suggested by Lamont Granquist (thanks!)
-rw-r--r--lib/chef/cookbook/synchronizer.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/cookbook/synchronizer.rb b/lib/chef/cookbook/synchronizer.rb
index 21ad373625..ec388746e9 100644
--- a/lib/chef/cookbook/synchronizer.rb
+++ b/lib/chef/cookbook/synchronizer.rb
@@ -263,7 +263,10 @@ class Chef
end
def cached_copy_up_to_date?(local_path, expected_checksum)
- return true if Chef::Config[:skip_cookbook_sync]
+ if Chef::Config[:skip_cookbook_sync]
+ Chef::Log.warn "skipping cookbook synchronization! DO NOT LEAVE THIS ENABLED IN PRODUCTION!!!"
+ return true
+ end
if cache.has_key?(local_path)
current_checksum = CookbookVersion.checksum_cookbook_file(cache.load(local_path, false))
expected_checksum == current_checksum