diff options
author | James Michael DuPont <JamesMikeDuPont@gmail.com> | 2015-09-03 00:18:56 -0400 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-02-16 12:33:30 +0000 |
commit | 7ba8ea2b93f54bd60049e6f86cba2a73bf845d11 (patch) | |
tree | fa46c7a76b18eb4d9129f7dce0ce05372f745f92 /lib/chef/knife | |
parent | 61906bae0a660759ed59339bb8ae49521c25c636 (diff) | |
download | chef-7ba8ea2b93f54bd60049e6f86cba2a73bf845d11.tar.gz |
bugfix #2865 check for validation_keytm/h4ck3rm1k3-master-master
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index a863e0cdb7..b05cae688c 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -44,7 +44,8 @@ class Chef end def validation_key - if File.exist?(File.expand_path(@chef_config[:validation_key])) + if @chef_config.has_key?(:validation_key) && + File.exist?(File.expand_path(@chef_config[:validation_key])) IO.read(File.expand_path(@chef_config[:validation_key])) else false |