summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAshwini <ashwini.nehate@msystechnologies.com>2019-12-11 17:22:22 +0530
committerNAshwini <ashwini.nehate@msystechnologies.com>2020-02-12 17:03:22 +0530
commite613e3d7d4f773b66aceee9cd4fba8a0df9d5769 (patch)
tree7c8e83e48c7a7b3dcf4c2c40905b90ea2169c0b7
parent3375e6260261214f4410196ad73adac9a71f191b (diff)
downloadchef-e613e3d7d4f773b66aceee9cd4fba8a0df9d5769.tar.gz
Don't send empty runlist if do not pass it.
Signed-off-by: NAshwini <ashwini.nehate@msystechnologies.com>
-rw-r--r--lib/chef/knife/core/bootstrap_context.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb
index 2b5887a7cf..9eb9e0143e 100644
--- a/lib/chef/knife/core/bootstrap_context.rb
+++ b/lib/chef/knife/core/bootstrap_context.rb
@@ -213,7 +213,7 @@ class Chef
attributes[:run_list] = @run_list
end
- attributes.delete(:run_list) if attributes[:policy_name] && !attributes[:policy_name].empty?
+ attributes.delete(:run_list) if ( attributes[:policy_name] && !attributes[:policy_name].empty? ) || ( attributes["policy_name"] && !attributes["policy_name"].empty? )
attributes.merge!(tags: @config[:tags]) if @config[:tags] && !@config[:tags].empty?
end
end