summaryrefslogtreecommitdiff
path: root/lib/chef/config_fetcher.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-10-16 10:20:04 -0700
committerdanielsdeleo <dan@opscode.com>2013-10-16 13:53:37 -0700
commita2e417039fd2850a4bc722c2ec2db9c9c36fca73 (patch)
tree8854170f0ef959ff653d1175baae6d9ad81ac061 /lib/chef/config_fetcher.rb
parent6f8ca6c27c0987fdfbbbb8e19cac69fa6a389c9e (diff)
downloadchef-a2e417039fd2850a4bc722c2ec2db9c9c36fca73.tar.gz
Flip config_missing? to return true when missing
Diffstat (limited to 'lib/chef/config_fetcher.rb')
-rw-r--r--lib/chef/config_fetcher.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/config_fetcher.rb b/lib/chef/config_fetcher.rb
index 2400dc6897..80a313590b 100644
--- a/lib/chef/config_fetcher.rb
+++ b/lib/chef/config_fetcher.rb
@@ -46,26 +46,26 @@ class Chef
end
def config_missing?
- return true if remote_config?
+ return false if remote_config?
# Check if the config file exists, and check if it is underneath the config file jail
begin
- real_config_file = Pathname.new(config_file).realpath.to_s
+ real_config_file = Pathname.new(config_location).realpath.to_s
rescue Errno::ENOENT
- return false
+ return true
end
# If realpath succeeded, the file exists
- return true if !config_file_jail
+ return false if !config_file_jail
begin
real_jail = Pathname.new(config_file_jail).realpath.to_s
rescue Errno::ENOENT
Chef::Log.warn("Config file jail #{config_file_jail} does not exist: will not load any config file.")
- return false
+ return true
end
- Chef::ChefFS::PathUtils.descendant_of?(real_config_file, real_jail)
+ !Chef::ChefFS::PathUtils.descendant_of?(real_config_file, real_jail)
end
def http