diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2018-07-10 18:55:20 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2018-07-10 18:56:21 -0700 |
commit | ac977e9494d516fbc44d6012bb157254c28c0a05 (patch) | |
tree | a31c7d52d4d1a968d86775087a1951cbde799778 | |
parent | ef9b7c95d7e7277dede08b4fd9f2df5af3e76903 (diff) | |
download | chef-ac977e9494d516fbc44d6012bb157254c28c0a05.tar.gz |
Fix up some tests I broke.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
-rw-r--r-- | chef-config/lib/chef-config/mixin/credentials.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chef-config/lib/chef-config/mixin/credentials.rb b/chef-config/lib/chef-config/mixin/credentials.rb index 9fdbaace6c..fb557f6093 100644 --- a/chef-config/lib/chef-config/mixin/credentials.rb +++ b/chef-config/lib/chef-config/mixin/credentials.rb @@ -41,7 +41,7 @@ module ChefConfig profile elsif ENV.include?("CHEF_PROFILE") ENV["CHEF_PROFILE"] - elsif File.exist?(context_file) + elsif File.file?(context_file) File.read(context_file).strip else "default" @@ -56,7 +56,7 @@ module ChefConfig # @return [void] def load_credentials(profile = nil) credentials_file = PathHelper.home(".chef", "credentials").freeze - return unless File.exist?(credentials_file) + return unless File.file?(credentials_file) profile = credentials_profile(profile) config = Tomlrb.load_file(credentials_file) if config[profile].nil? |