From 51acd91fe175c9da0972c3172d3193f6eefb6af6 Mon Sep 17 00:00:00 2001 From: James Michael DuPont Date: Sat, 26 Sep 2015 06:22:29 -0400 Subject: better error reporting --- lib/chef/api_client/registration.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/chef/api_client') 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 -- cgit v1.2.1