diff options
author | Ryota Arai <ryota.arai@gmail.com> | 2013-11-21 10:37:06 +0900 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-11-26 07:31:26 -0800 |
commit | 7543633aad455c7d9c409ecc93b46357fc1a87bb (patch) | |
tree | b0808a3e961a27873f16a50b4886da5b3c2bb852 | |
parent | 0ead522ef5a257327c230b6bd3036523a80de70e (diff) | |
download | chef-7543633aad455c7d9c409ecc93b46357fc1a87bb.tar.gz |
Modify a message when any cookbook is not found.
-rw-r--r-- | lib/chef/client.rb | 2 | ||||
-rw-r--r-- | spec/unit/client_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index a8387f4e9d..6a39395bb6 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -559,7 +559,7 @@ class Chef cookbook_paths = Array(Chef::Config[:cookbook_path]) Chef::Log.debug "Loading from cookbook_path: #{cookbook_paths.map { |path| File.expand_path(path) }.join(', ')}" if cookbook_paths.all? {|path| empty_directory?(path) } - msg = "None of the cookbook paths, #{cookbook_paths.inspect}, contain any cookbooks" + msg = "None of the cookbook paths set in Chef::Config[:cookbook_path], #{cookbook_paths.inspect}, contain any cookbooks" Chef::Log.fatal(msg) raise Chef::Exceptions::CookbookNotFound, msg end diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb index 6a87e217e5..eb705e0386 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -456,7 +456,7 @@ shared_examples_for Chef::Client do it "raises CookbookNotFound error" do expect do @client.send(:assert_cookbook_path_not_empty, nil) - end.to raise_error(Chef::Exceptions::CookbookNotFound, 'None of the cookbook paths, ["/path/to/invalid/cookbook_path"], contain any cookbooks') + end.to raise_error(Chef::Exceptions::CookbookNotFound, 'None of the cookbook paths set in Chef::Config[:cookbook_path], ["/path/to/invalid/cookbook_path"], contain any cookbooks') end end end |