From 7ba8ea2b93f54bd60049e6f86cba2a73bf845d11 Mon Sep 17 00:00:00 2001 From: James Michael DuPont Date: Thu, 3 Sep 2015 00:18:56 -0400 Subject: bugfix #2865 check for validation_key --- lib/chef/knife/core/bootstrap_context.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/chef') 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 -- cgit v1.2.1