diff options
author | Vivek Singh <vivek.singh@msystechnologies.com> | 2019-09-27 16:48:36 +0530 |
---|---|---|
committer | Vivek Singh <vivek.singh@msystechnologies.com> | 2019-10-28 14:06:22 +0530 |
commit | f725ddcc52bd7ca5cf3b7ac1ba87778e4c4e39a2 (patch) | |
tree | 4897a2672b443308fcd3855c98a8ef4c2002ef24 /lib/chef/chef_fs/file_system | |
parent | 377861d1f1dcd93f39f1e8596db50a63f7650ca2 (diff) | |
download | chef-f725ddcc52bd7ca5cf3b7ac1ba87778e4c4e39a2.tar.gz |
Fix knife cookbook site share chefignore lookup
Fix cookbook syntax_check dir path error if cookbook_path is an array
Fix invalid error if cookbook_path set to nil or empty Array and TypeError: no implicit conversion of nil into String
Chefignore for each cookbooks/:cookbook
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
Diffstat (limited to 'lib/chef/chef_fs/file_system')
-rw-r--r-- | lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb index 1708428372..6ae5045284 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb @@ -68,13 +68,14 @@ class Chef end # Check chefignore - ignorer = parent + ignorer = self + loop do - if ignorer.is_a?(CookbooksDir) + if ignorer.is_a?(ChefRepositoryFileSystemCookbookDir) # Grab the path from entry to child path_to_child = name child = self - while child.parent != ignorer + while child != ignorer path_to_child = PathUtils.join(child.name, path_to_child) child = child.parent end |