diff options
author | Thom May <thom@may.lt> | 2018-02-20 10:14:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 10:14:51 +0000 |
commit | 13ea697152ec89704b4a725565a684e1c8f32203 (patch) | |
tree | 87e2bf92ca85cf7b276a7ea597babe0ee9e437fd | |
parent | 1971b9a70567a073c1c184b37e1a27cbc56fb32f (diff) | |
parent | c5c196d283470abc17b6af34a6ec6a54e647a419 (diff) | |
download | chef-13ea697152ec89704b4a725565a684e1c8f32203.tar.gz |
Merge pull request #6859 from higanworks/compare_with_identifier
check identifier to resolve exported cookbooks by chef export
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 5 |
1 files changed, 4 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 4f248625b3..59f15d5345 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -309,7 +309,10 @@ class Chef elsif %w{cookbooks cookbook_artifacts}.include?(path[0]) && path.length == 3 with_entry([path[0]]) do |entry| cookbook_type = path[0] - cookbook_entry = entry.children.select { |child| child.chef_object.full_name == "#{path[1]}-#{path[2]}" }[0] + cookbook_entry = entry.children.select { |child| + child.chef_object.full_name == "#{path[1]}-#{path[2]}" || + (child.chef_object.name.to_s == path[1] && child.chef_object.identifier == path[2]) + }[0] raise ChefZero::DataStore::DataNotFoundError.new(path) if cookbook_entry.nil? result = nil begin |