diff options
author | Thom May <thom@chef.io> | 2016-05-20 10:38:11 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-05-20 10:38:11 +0100 |
commit | 3a854109bd0de5fbac8faff7eab0a54e44d7881e (patch) | |
tree | 1bb8c031df172bec61c0ffcbbeec5032d1f91352 /lib/chef/application | |
parent | cfab6de01fd596a03b60ce9c9dd59e4b7cb5aa48 (diff) | |
download | chef-3a854109bd0de5fbac8faff7eab0a54e44d7881e.tar.gz |
Ensure recipe-url works right in solotm/solo_fixes
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/solo.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index bc2d279508..9c34d613d8 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 |