diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-06 15:12:11 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-06 15:39:54 -0800 |
commit | de513403180ee04290b2d462e9868847addf1077 (patch) | |
tree | c079fab8778f7a5937d70c76b7e6d9df6ac4201e | |
parent | c66c5b66079934a51307907c15f4443235201d7b (diff) | |
download | chef-de513403180ee04290b2d462e9868847addf1077.tar.gz |
Merge pull request #3019 from ranjib/fix_search
Fix data fetching when explicit attributes are passed
-rw-r--r-- | lib/chef/knife/search.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/knife/search.rb b/lib/chef/knife/search.rb index a6cec761ce..9319d30e7d 100644 --- a/lib/chef/knife/search.rb +++ b/lib/chef/knife/search.rb @@ -106,8 +106,7 @@ class Chef formatted_item = Hash.new if item.is_a?(Hash) # doing a little magic here to set the correct name - formatted_item[item["data"]["__display_name"]] = item["data"] - formatted_item[item["data"]["__display_name"]].delete("__display_name") + formatted_item[item["__display_name"]] = item.reject{|k| k == "__display_name"} else formatted_item = format_for_display(item) end |