summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-05-27 17:34:09 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-05-27 17:34:09 -0700
commit37d8edecde642300309e156950b58f219e41b9be (patch)
tree12e9f76984903cc556948b73ec0993f8c1c758b3
parent3a94ccd43fcf3e3c680edad1c090da508809eacc (diff)
downloadchef-37d8edecde642300309e156950b58f219e41b9be.tar.gz
Chef-16 API compatibility
This is messy but thankfully its is against a codebranch which will become extinct. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/knife/bootstrap.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index 98efe6aae6..f61039cb51 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -1108,7 +1108,8 @@ class Chef
# These keys are available in Chef::Config, and are prefixed with the protocol name.
# For example, :user CLI option will map to :winrm_user and :ssh_user Chef::Config keys,
# based on the connection protocol in use.
- def knife_key_for_protocol(protocol, option)
+ def knife_key_for_protocol(new_option, option = nil)
+ option = new_option if option.nil? # hacky compat with both old Chef-15 style and new Chef-16 style API signature
"#{connection_protocol}_#{option}".to_sym
end