summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Mcgillivray <scott.mcgillivray@ubisoft.com>2015-05-29 08:54:44 +0000
committerLamont Granquist <lamont@scriptkiddie.org>2015-10-24 17:07:49 -0700
commit25a95319093f4754b517f2cdd599f02dffdaccdc (patch)
tree95a585a797fffacad17852a4bf03f1dcb8c60d03
parent0db3bd6271308bd02d3e05d99cdebf4f2ee13062 (diff)
downloadchef-25a95319093f4754b517f2cdd599f02dffdaccdc.tar.gz
Fix 'knife cookbook show' to work on root files
e.g. knife cookbook show nginx 0.1.4 root_files metadata.rb
-rw-r--r--lib/chef/cookbook_version.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index 3cdfd8c10b..34680243c5 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -450,7 +450,11 @@ class Chef
end
relative_search_path.map {|relative_path| File.join(segment.to_s, relative_path)}
else
- [File.join(segment, path)]
+ if segment.to_sym == :root_files
+ [] << path
+ else
+ [File.join(segment, path)]
+ end
end
end
private :preferences_for_path