diff options
author | John Keiser <jkeiser@opscode.com> | 2014-04-22 09:27:27 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-04-22 09:27:27 -0700 |
commit | d12cffbdfd4c55b3ddeec45f5bcb30719a298c83 (patch) | |
tree | 97d013d4d9bb58905c077710134cc329e35bf1b7 /lib/chef/chef_fs | |
parent | 3b9ca6d6c03613638b6ea8c23d2b18535585d06d (diff) | |
download | chef-d12cffbdfd4c55b3ddeec45f5bcb30719a298c83.tar.gz |
Do not automatically create data bags
just because someone wants to create a data bag item
Diffstat (limited to 'lib/chef/chef_fs')
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index c75c3bff76..7f5abaf013 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -382,8 +382,10 @@ class Chef end def with_dir(path) + # Do not automatically create data bags + create = !(path[0] == 'data' && path.size >= 2) begin - yield get_dir(_to_chef_fs_path(path), true) + yield get_dir(_to_chef_fs_path(path), create) rescue Chef::ChefFS::FileSystem::NotFoundError => e raise ChefZero::DataStore::DataNotFoundError.new(to_zero_path(e.entry), e) end |