summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-05-31 18:25:55 +0100
committerThom May <thom@may.lt>2016-05-31 18:25:55 +0100
commitf620577c57c9282e3ccc71a29cefacfe939d6329 (patch)
tree7fb3c1f0146c08bb5019d388c42bc23569a8417e /lib/chef
parentd5249426a11ada942365160fcb3a64de0840a09c (diff)
parent3a854109bd0de5fbac8faff7eab0a54e44d7881e (diff)
downloadchef-f620577c57c9282e3ccc71a29cefacfe939d6329.tar.gz
Merge pull request #4957 from chef/tm/solo_fixes
Ensure recipe-url works right in solo
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/application/solo.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 0c66f6cf40..ecac3f4d4e 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -212,6 +212,7 @@ class Chef::Application::Solo < Chef::Application
def run
setup_signal_handlers
reconfigure
+ for_ezra if Chef::Config[:ez]
if !Chef::Config[:solo_legacy_mode]
Chef::Application::Client.new.run
else
@@ -232,6 +233,14 @@ class Chef::Application::Solo < Chef::Application
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[:solo_legacy_mode]
+ # Because we re-parse ARGV when we move to chef-client, we need to tidy up some options first.
+ ARGV.delete("--ez")
+
+ # -r means something entirely different in chef-client land, so let's replace it with a "safe" value
+ if dash_r = ARGV.index("-r")
+ ARGV[dash_r] = "--recipe-url"
+ end
+
Chef::Config[:local_mode] = true
else
configure_legacy_mode!
@@ -277,7 +286,6 @@ class Chef::Application::Solo < Chef::Application
end
def run_application
- for_ezra if Chef::Config[:ez]
if !Chef::Config[:client_fork] || Chef::Config[:once]
# Run immediately without interval sleep or splay
begin