diff options
author | Tim Smith <tsmith@chef.io> | 2020-06-08 09:34:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 09:34:29 -0700 |
commit | 57c3335aeefbd52e61bfeda81d4e0f5f91c20ecf (patch) | |
tree | 102ef9da4b003c0347c0e351d2536cbe90568ecf | |
parent | 348ca883838d3f55d21893cf163af1aa3d37c967 (diff) | |
parent | 51180160fa9e9dce671d755abcbeb33c4c24879f (diff) | |
download | chef-57c3335aeefbd52e61bfeda81d4e0f5f91c20ecf.tar.gz |
Merge pull request #9952 from chef/Snehal/Github-#333_knife_vault_on_windows_10_fails
knife vault on windows 10 fails due to ERROR: Chef::Exceptions::InvalidDataBagPath
-rw-r--r-- | lib/chef/data_bag.rb | 4 | ||||
-rw-r--r-- | spec/unit/data_bag_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/data_bag.rb b/lib/chef/data_bag.rb index d64d610fd9..5715f1970d 100644 --- a/lib/chef/data_bag.rb +++ b/lib/chef/data_bag.rb @@ -94,7 +94,7 @@ class Chef names = [] paths.each do |path| unless File.directory?(path) - raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}' is invalid" + raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}' not found. Please create this directory." end names += Dir.glob(File.join( @@ -122,7 +122,7 @@ class Chef data_bag = {} paths.each do |path| unless File.directory?(path) - raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}' is invalid" + raise Chef::Exceptions::InvalidDataBagPath, "Data bag path '#{path}' not found. Please create this directory." end Dir.glob(File.join(Chef::Util::PathHelper.escape_glob_dir(path, name.to_s), "*.json")).inject({}) do |bag, f| diff --git a/spec/unit/data_bag_spec.rb b/spec/unit/data_bag_spec.rb index 6089b4b85d..7e5ef46d58 100644 --- a/spec/unit/data_bag_spec.rb +++ b/spec/unit/data_bag_spec.rb @@ -243,7 +243,7 @@ describe Chef::DataBag do expect do Chef::DataBag.load("foo") - end.to raise_error Chef::Exceptions::InvalidDataBagPath, "Data bag path '/var/chef/data_bags' is invalid" + end.to raise_error Chef::Exceptions::InvalidDataBagPath, "Data bag path '/var/chef/data_bags' not found. Please create this directory." end end |