summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Neitsch <andrew@neitsch.ca>2019-08-19 11:05:39 -0600
committerAndrew Neitsch <andrew@neitsch.ca>2019-08-19 11:05:39 -0600
commit1e90c1b0650060e96129b2d50ef5f24ae7eac2ec (patch)
treeec4a09312d259b85b85e25f3175da2d039f95287
parent369333eacb10b426f4056208deeacd5e365365de (diff)
downloadchef-1e90c1b0650060e96129b2d50ef5f24ae7eac2ec.tar.gz
Fix crash when showing error about missing profile
Before: /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-config-15.1.36/lib/chef-config/mixin/credentials.rb:92:in `load_credentials': undefined local variable or method `credentials_file' for #<ChefConfig::WorkstationConfigLoader:0x00007fe01c8321e8> (NameError) After: ERROR: CONFIGURATION ERROR:Profile xyz doesn't exist. Please add it to /Users/developer/.chef/credentials. It looks like this was missed as part of the refactoring in d730505bb0d53d14c7b005c756ed4993b95fdf94. Signed-off-by: Andrew Neitsch <andrew@neitsch.ca>
-rw-r--r--chef-config/lib/chef-config/mixin/credentials.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/chef-config/lib/chef-config/mixin/credentials.rb b/chef-config/lib/chef-config/mixin/credentials.rb
index 3882924d1a..bb4d55f4bc 100644
--- a/chef-config/lib/chef-config/mixin/credentials.rb
+++ b/chef-config/lib/chef-config/mixin/credentials.rb
@@ -92,7 +92,7 @@ module ChefConfig
# raise an error.
return if profile == "default"
- raise ChefConfig::ConfigurationError, "Profile #{profile} doesn't exist. Please add it to #{credentials_file}."
+ raise ChefConfig::ConfigurationError, "Profile #{profile} doesn't exist. Please add it to #{credentials_file_path}."
end
apply_credentials(config[profile], profile)
end