summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2018-08-21 04:40:03 -0700
committerNoah Kantrowitz <noah@coderanger.net>2018-08-21 04:40:03 -0700
commitfda14962c003f6f43d1a2656951dfebccf0845c4 (patch)
tree3cf0c3ab477f90ae406ab2c5af2e16d9322aeef1
parent6fef2c0b62dd5e21b7b7fcb02b9a2639632662b9 (diff)
downloadchef-fda14962c003f6f43d1a2656951dfebccf0845c4.tar.gz
Check for an actual value, rather than the key being set.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
-rw-r--r--lib/chef/knife/core/bootstrap_context.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb
index 4e21564c52..5c736ab01b 100644
--- a/lib/chef/knife/core/bootstrap_context.rb
+++ b/lib/chef/knife/core/bootstrap_context.rb
@@ -45,7 +45,7 @@ class Chef
end
def validation_key
- if @chef_config.key?(:validation_key) &&
+ if @chef_config[:validation_key] &&
File.exist?(File.expand_path(@chef_config[:validation_key]))
IO.read(File.expand_path(@chef_config[:validation_key]))
else