From b8166de42ec1a7841eff9a7e2d7e6b6724075d89 Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Sat, 6 Jun 2020 21:45:01 -0700 Subject: 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 --- lib/chef/application/apply.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1