summaryrefslogtreecommitdiff
path: root/lib/chef/application
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-05-10 17:09:57 +0100
committerThom May <thom@chef.io>2016-05-16 13:38:12 +0100
commit09ae18ee32b61e1b3c607dcc84c9d59d2c300428 (patch)
tree0add1084ac4642c5119dff102000075bf6d58321 /lib/chef/application
parent9bd561b2fafe03444d690bef0b882a446b327cd6 (diff)
downloadchef-09ae18ee32b61e1b3c607dcc84c9d59d2c300428.tar.gz
Ensure that solo specific code is run at the proper time
ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/application')
-rw-r--r--lib/chef/application/apply.rb2
-rw-r--r--lib/chef/application/solo.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 03c86b86f2..37ddcb3164 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -150,7 +150,7 @@ class Chef::Application::Apply < Chef::Application
end
def get_recipe_and_run_context
- Chef::Config[:solo] = true
+ Chef::Config[:solo_legacy_mode] = true
@chef_client = Chef::Client.new(@json_attribs)
@chef_client.run_ohai
@chef_client.load_node
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 9761a90d22..b3d2f61a52 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -201,7 +201,7 @@ class Chef::Application::Solo < Chef::Application
:description => "DANGEROUS: does what it says, only useful with --recipe-url",
:boolean => true
- option :og_chef_solo,
+ option :solo_legacy_mode,
:long => "--legacy-mode",
:description => "Run chef-solo in legacy mode",
:boolean => true
@@ -212,7 +212,7 @@ class Chef::Application::Solo < Chef::Application
def run
setup_signal_handlers
reconfigure
- if !Chef::Config[:og_chef_solo]
+ if !Chef::Config[:solo_legacy_mode]
Chef::Application::Client.new.run
else
setup_application
@@ -228,11 +228,11 @@ class Chef::Application::Solo < Chef::Application
set_specific_recipes
Chef::Config[:solo] = true
- # Chef::Config[:og_chef_solo] = true
+ # Chef::Config[:solo_legacy_mode] = true
Chef::Log.deprecation("-r MUST be changed to --recipe-url, the -r option will be changed in Chef 13.0") if ARGV.include?("-r")
- if !Chef::Config[:og_chef_solo]
+ if !Chef::Config[:solo_legacy_mode]
Chef::Config[:local_mode] = true
else