summaryrefslogtreecommitdiff
path: root/lib/chef/application
diff options
context:
space:
mode:
authortyler-ball <tball@chef.io>2019-04-22 15:24:19 -0600
committerMark Anderson <mark@chef.io>2019-05-03 21:40:19 -0700
commitc1fec9e0b6c4195be55e89d749bbffbae470539b (patch)
tree896a549a31291b26b473a11deed67dd305df2133 /lib/chef/application
parentdb12e959e88aae92b9414a7637007ce7263fed1a (diff)
downloadchef-c1fec9e0b6c4195be55e89d749bbffbae470539b.tar.gz
Only Chef Software binaries should enforce EULA
Signed-off-by: tyler-ball <tball@chef.io>
Diffstat (limited to 'lib/chef/application')
-rw-r--r--lib/chef/application/apply.rb3
-rw-r--r--lib/chef/application/solo.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 34f0973b40..715e0152d2 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -214,8 +214,9 @@ class Chef::Application::Apply < Chef::Application
end
# Get this party started
- def run
+ def run(enforce_license = false)
reconfigure
+ check_license_acceptance if enforce_license
run_application
end
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 04cc9265ff..4a3957146e 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -217,10 +217,11 @@ class Chef::Application::Solo < Chef::Application
attr_reader :chef_client_json
# Get this party started
- def run
+ def run(enforce_license = false)
setup_signal_handlers
setup_application
reconfigure
+ check_license_acceptance if enforce_license
for_ezra if Chef::Config[:ez]
if !Chef::Config[:solo_legacy_mode]
Chef::Application::Client.new.run