summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsnehaldwivedi <sdwivedi@msystechnologies.com>2020-06-05 19:43:40 +0530
committerTim Smith <tsmith84@gmail.com>2020-06-23 10:25:42 -0700
commitd073e776b741140642525c78f91a38b30c99ecee (patch)
tree306baea4235334e81af828196e832df9550e6bee
parent617c8464c9aa61ac928cc9f5530a11068ea23dad (diff)
downloadchef-d073e776b741140642525c78f91a38b30c99ecee.tar.gz
Updated exception message
Signed-off-by: snehaldwivedi <sdwivedi@msystechnologies.com>
-rw-r--r--lib/chef/data_bag.rb4
-rw-r--r--spec/unit/data_bag_spec.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/data_bag.rb b/lib/chef/data_bag.rb
index cd728168b6..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, "Please create databag folder at '#{path}'"
+ 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, "Please create databag folder at '#{path}'"
+ 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 82cf8e6fb4..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, "Please create databag folder at '/var/chef/data_bags'"
+ end.to raise_error Chef::Exceptions::InvalidDataBagPath, "Data bag path '/var/chef/data_bags' not found. Please create this directory."
end
end