summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-09-23 10:01:33 -0700
committerGitHub <noreply@github.com>2019-09-23 10:01:33 -0700
commit570b12af02334cd971e8a4bf628d3a5370ab484c (patch)
tree58fa85033a44389dda22cbb59e5e3e9569500aec
parent5b5a5f37231fe1af4a27bb163610afeb6e708b56 (diff)
parent658bf811434e6790c39b14e71ab640c5e5855cb2 (diff)
downloadchef-570b12af02334cd971e8a4bf628d3a5370ab484c.tar.gz
Merge pull request #8911 from coding-blip/fix-chefcli-knife-config
Add empty chefcli config_context to fix commands with chefcli in knife.rb
-rw-r--r--chef-config/lib/chef-config/config.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 0bb9ca4124..02acdf4ca2 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -954,14 +954,18 @@ module ChefConfig
default :watchdog_timeout, 2 * (60 * 60) # 2 hours
end
- # Add an empty and non-strict config_context for chefdk. This lets the user
- # have code like `chefdk.generator_cookbook "/path/to/cookbook"` in their
- # config.rb, and it will be ignored by tools like knife and ohai. ChefDK
- # itself can define the config options it accepts and enable strict mode,
+ # Add an empty and non-strict config_context for chefdk and chefcli.
+ # This lets the user have code like `chefdk.generator_cookbook "/path/to/cookbook"` or
+ # `chefcli[:generator_cookbook] = "/path/to/cookbook"` in their config.rb,
+ # and it will be ignored by tools like knife and ohai. ChefDK and ChefCLI
+ # themselves can define the config options it accepts and enable strict mode,
# and that will only apply when running `chef` commands.
config_context :chefdk do
end
+ config_context :chefcli do
+ end
+
# Configuration options for Data Collector reporting. These settings allow
# the user to configure where to send their Data Collector data, what token
# to send, and whether Data Collector should report its findings in client