summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-01-15 14:26:29 -0800
committerJohn Keiser <john@johnkeiser.com>2016-01-15 15:08:54 -0800
commitbde41cf03f898e459b3ed883cbad9068355bf84f (patch)
tree246b81ef6bbd380256dea80f9a88766fdebebf58
parent420acb37e6b7abf6d4c57b3f6af56c275de9a4d2 (diff)
downloadchef-bde41cf03f898e459b3ed883cbad9068355bf84f.tar.gz
Split identifier from name for cookbook_artifacts
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb4
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 4596408590..9070e69633 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -502,7 +502,9 @@ class Chef
elsif %w(cookbooks cookbook_artifacts).include?(path[0]) && path.length == 1
with_entry(path) do |entry|
begin
- if chef_fs.versioned_cookbooks && path[0] == "cookbooks"
+ if path[0] == "cookbook_artifacts"
+ entry.children.map { |child| child.name.rpartition('-')[0] }.uniq
+ elsif chef_fs.versioned_cookbooks
# /cookbooks/name-version -> /cookbooks/name
entry.children.map { |child| split_name_version(child.name)[0] }.uniq
else