summaryrefslogtreecommitdiff
path: root/lib/chef/api_client
diff options
context:
space:
mode:
authorJames Michael DuPont <JamesMikeDuPont@gmail.com>2015-09-26 06:22:29 -0400
committerLamont Granquist <lamont@scriptkiddie.org>2015-10-24 20:25:12 -0700
commit51acd91fe175c9da0972c3172d3193f6eefb6af6 (patch)
tree7fd0ef50b80ced0411721567c5cc15de25d4ff6c /lib/chef/api_client
parentee6b56251fb0be8784939be6535e1ec78f4fc67c (diff)
downloadchef-51acd91fe175c9da0972c3172d3193f6eefb6af6.tar.gz
better error reporting
Diffstat (limited to 'lib/chef/api_client')
-rw-r--r--lib/chef/api_client/registration.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/api_client/registration.rb b/lib/chef/api_client/registration.rb
index de5fc7ac3d..fbd9f1a85d 100644
--- a/lib/chef/api_client/registration.rb
+++ b/lib/chef/api_client/registration.rb
@@ -68,7 +68,8 @@ class Chef
def assert_destination_writable!
if (File.exists?(destination) && !File.writable?(destination)) or !File.writable?(File.dirname(destination))
- raise Chef::Exceptions::CannotWritePrivateKey, "I cannot write your private key to #{destination} - check permissions?"
+ abs_path = File.expand_path(destination)
+ raise Chef::Exceptions::CannotWritePrivateKey, "I cannot write your private key to #{destination} (#{abs_path})- check permissions?"
end
end