summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shestoperov <dmitry@shestoperov.info>2017-09-24 23:19:48 -0400
committerDmitry Shestoperov <dmitry@shestoperov.info>2017-09-24 23:19:48 -0400
commit523b6f106ab217ce06a7b7555404a1a6fe45c9f8 (patch)
treeedcd6c2dd524fde30ce0e3707467f65f22ded682
parent85957c76e2981fca06c9377a1363a79e1277199d (diff)
downloadchef-523b6f106ab217ce06a7b7555404a1a6fe45c9f8.tar.gz
if id_only specified, create result filter containing magic filter only
Signed-off-by: Dmitry Shestoperov <dmitry@shestoperov.info>
-rw-r--r--lib/chef/knife/search.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/knife/search.rb b/lib/chef/knife/search.rb
index c4c3380734..2a68ec5108 100644
--- a/lib/chef/knife/search.rb
+++ b/lib/chef/knife/search.rb
@@ -91,6 +91,8 @@ class Chef
search_args[:filter_result] = create_result_filter(config[:filter_result])
elsif (not ui.config[:attribute].nil?) && (not ui.config[:attribute].empty?)
search_args[:filter_result] = create_result_filter_from_attributes(ui.config[:attribute])
+ elsif config[:id_only]
+ search_args[:filter_result] = create_result_filter_from_attributes([])
end
begin