summaryrefslogtreecommitdiff
path: root/lib/chef/application
diff options
context:
space:
mode:
authorLance Albertson <lance@osuosl.org>2020-06-06 21:45:01 -0700
committerLance Albertson <lance@osuosl.org>2020-06-08 12:34:39 -0700
commitb8166de42ec1a7841eff9a7e2d7e6b6724075d89 (patch)
tree255e6feb7e18b12fd550d8ee5528ec25442095e2 /lib/chef/application
parent090e973e565a49fa48cf58a0fb95e5bc56002ef3 (diff)
downloadchef-b8166de42ec1a7841eff9a7e2d7e6b6724075d89.tar.gz
Fix how enforce_license is set in run method for chef-apply
I recently discovered that when using Chef::Application::Apply.new.run(enforce_license: false), chef-apply will still run the license verification when I expected it to be disabled. It seems this feature works if you install this as a gem, however if you build chef using omnibus with this set, it refuses to work. I suspect this might be something with appbundler. I noticed that other binaries (i.e. solo) were using "run(enforce_license: false)" instead of "run(enforce_license = false)" which chef-apply uses. If I changed this to "run(enforce_license: false)", this worked as expected. Signed-off-by: Lance Albertson <lance@osuosl.org>
Diffstat (limited to 'lib/chef/application')
-rw-r--r--lib/chef/application/apply.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 33a8a97f5b..4ed2d2a1f2 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -233,7 +233,7 @@ class Chef::Application::Apply < Chef::Application
end
# Get this party started
- def run(enforce_license = false)
+ def run(enforce_license: false)
reconfigure
check_license_acceptance if enforce_license
run_application