summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/file_system
diff options
context:
space:
mode:
authorVasu1105 <vasundhara.jagdale@msystechnologies.com>2019-12-20 14:16:29 +0530
committerVasu1105 <vasundhara.jagdale@msystechnologies.com>2019-12-20 14:16:29 +0530
commite57e97eb4c72a4a7213eecce8fbb15ce74159848 (patch)
tree741c06b2d234cefb975efbe65c67b52444868591 /lib/chef/chef_fs/file_system
parente78d3e46ec1c449e48435755811fa47f8ea1e0c9 (diff)
downloadchef-e57e97eb4c72a4a7213eecce8fbb15ce74159848.tar.gz
Added client side validation to validate presence of metadata files and validate name field
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'lib/chef/chef_fs/file_system')
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb b/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb
index 3c13bca3a3..52fc708552 100644
--- a/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb
+++ b/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb
@@ -73,6 +73,7 @@ class Chef
def upload_cookbook(other, options)
cookbook = other.chef_object if other.chef_object
+ raise Chef::Exceptions::MetadataNotFound.new(cookbook.root_paths[0], cookbook.name) unless cookbook.has_metadata_file?
if cookbook
begin