diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-10-24 17:09:14 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-10-24 17:09:14 -0700 |
commit | fa18670d7f97a83726ac45fb451271e7f070d574 (patch) | |
tree | bf490b9a0eb28081d8e907e983dee97497b48e3a | |
parent | 0db3bd6271308bd02d3e05d99cdebf4f2ee13062 (diff) | |
parent | b4920747ba674cbf9ed83273b6c705000cf45be9 (diff) | |
download | chef-fa18670d7f97a83726ac45fb451271e7f070d574.tar.gz |
Merge pull request #4100 from chef/lcg/3450
Fix 'knife cookbook show' to work on root files
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | lib/chef/cookbook_version.rb | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a3dc626e55..f2c5223eec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ [pr#3193](https://github.com/chef/chef/pull/3193) provider/user/dscl: Set "comment" default value * [**Jordan Evans**](https://github.com/jordane) [pr#3263](https://github.com/chef/chef/pull/3263) `value_for_platform` should use `Chef::VersionConstraint::Platform` +* [**Scott McGillivray**](https://github.com/thechile) + [pr#3450](https://github.com/chef/chef/pull/3450) Fix 'knife cookbook show' to work on root files * [pr#4034](https://github.com/chef/chef/pull/4034) add optional ruby-profiling with --profile-ruby * [pr#3119](https://github.com/chef/chef/pull/3119) allow removing user, even if their GID isn't resolvable diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 3cdfd8c10b..0e9617f98c 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -4,7 +4,7 @@ # Author:: Tim Hinderliter (<tim@opscode.com>) # Author:: Seth Falcon (<seth@opscode.com>) # Author:: Daniel DeLeo (<dan@opscode.com>) -# Copyright:: Copyright 2008-2011 Opscode, Inc. +# Copyright:: Copyright 2008-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -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 |