summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-02-06 12:59:39 -0800
committerTim Smith <tsmith84@gmail.com>2020-02-06 13:23:38 -0800
commit3d5f7f9b161bcd1db60d8553b31d9020f8484d77 (patch)
tree42ec094b9203e62b8e405ebc0825889cc1dfbfde
parentea7b1484554ceece6832b06db5e19d63e71744ac (diff)
downloadchef-3d5f7f9b161bcd1db60d8553b31d9020f8484d77.tar.gz
Expand the path in knife cookbook upload errors
WARNING: Could not find any cookbooks in your cookbook path: '/Users/tsmith/dev/work/chef'. Use --cookbook-path to specify the desired path. instead of: WARNING: Could not find any cookbooks in your cookbook path: .. Use --cookbook-path to specify the desired path. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/knife/cookbook_upload.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb
index fe72e139a3..aa226a1fc1 100644
--- a/lib/chef/knife/cookbook_upload.rb
+++ b/lib/chef/knife/cookbook_upload.rb
@@ -108,7 +108,7 @@ class Chef
if cookbooks.empty?
cookbook_path = config[:cookbook_path].respond_to?(:join) ? config[:cookbook_path].join(", ") : config[:cookbook_path]
- ui.warn("Could not find any cookbooks in your cookbook path: #{cookbook_path}. Use --cookbook-path to specify the desired path.")
+ ui.warn("Could not find any cookbooks in your cookbook path: '#{File.expand_path(cookbook_path)}'. Use --cookbook-path to specify the desired path.")
else
begin
tmp_cl = Chef::CookbookLoader.copy_to_tmp_dir_from_array(cookbooks)