diff options
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r-- | lib/chef/environment.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb index c121e37880..4f0c365443 100644 --- a/lib/chef/environment.rb +++ b/lib/chef/environment.rb @@ -254,11 +254,11 @@ class Chef js_file = File.join(Chef::Config[:environment_path], "#{name}.json") rb_file = File.join(Chef::Config[:environment_path], "#{name}.rb") - if File.exists?(js_file) + if File.exist?(js_file) # from_json returns object.class => json_class in the JSON. hash = Chef::JSONCompat.parse(IO.read(js_file)) from_hash(hash) - elsif File.exists?(rb_file) + elsif File.exist?(rb_file) environment = Chef::Environment.new environment.name(name) environment.from_file(rb_file) |