summaryrefslogtreecommitdiff
path: root/lib/chef/environment.rb
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/environment.rb
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/environment.rb')
-rw-r--r--lib/chef/environment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb
index f6d22843d4..32ebde6f4f 100644
--- a/lib/chef/environment.rb
+++ b/lib/chef/environment.rb
@@ -244,7 +244,7 @@ class Chef
end
def self.load(name)
- if Chef::Config[:solo]
+ if Chef::Config[:solo_legacy_mode]
load_from_file(name)
else
self.from_hash(chef_server_rest.get("environments/#{name}"))
@@ -310,7 +310,7 @@ class Chef
def self.validate_cookbook_version(version)
begin
- if Chef::Config[:solo]
+ if Chef::Config[:solo_legacy_mode]
raise Chef::Exceptions::IllegalVersionConstraint,
"Environment cookbook version constraints not allowed in chef-solo"
else