summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsawanoboly <sawanoboriyu@higanworks.com>2015-02-27 17:43:47 +0900
committersawanoboly <sawanoboriyu@higanworks.com>2015-02-27 17:43:47 +0900
commitc4afc649b0da00d585cbf8ff4025a374d68b7802 (patch)
tree5f188b10a932d0d109f27ed8fbd365d501b41288
parentc2dfb56e730214266ae07a57a56e5889b1e6b85b (diff)
downloadchef-c4afc649b0da00d585cbf8ff4025a374d68b7802.tar.gz
avoid case Chef::Config[:validation_key] is nil.
-rw-r--r--lib/chef/knife/bootstrap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index f23c15fa70..18a2a16181 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -313,7 +313,7 @@ class Chef
# chef-vault integration must use the new client-side hawtness, otherwise to use the
# new client-side hawtness, just delete your validation key.
- if chef_vault_handler.doing_chef_vault? || !File.exist?(File.expand_path(Chef::Config[:validation_key]))
+ if chef_vault_handler.doing_chef_vault? || Chef::Config[:validation_key] && !File.exist?(File.expand_path(Chef::Config[:validation_key]))
client_builder.run
chef_vault_handler.run(node_name: config[:chef_node_name])