summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-10-09 10:57:24 -0700
committerGitHub <noreply@github.com>2019-10-09 10:57:24 -0700
commit21241ac2b07f472b622761ffe2f975458d212500 (patch)
tree4570f5913ad33c58c89cba04762a713d6c0dd6fe
parent5a5c5b80d1329120d9f8b742f67743b6dd2fb275 (diff)
parent54233b4253220be1fdd6068459c8e889b57bd4fc (diff)
downloadchef-21241ac2b07f472b622761ffe2f975458d212500.tar.gz
Merge pull request #8977 from chef/fix_profile_crash
Fix crash when showing error about missing profile
-rw-r--r--chef-config/lib/chef-config/mixin/credentials.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/chef-config/lib/chef-config/mixin/credentials.rb b/chef-config/lib/chef-config/mixin/credentials.rb
index 0a7ca356c8..3337294438 100644
--- a/chef-config/lib/chef-config/mixin/credentials.rb
+++ b/chef-config/lib/chef-config/mixin/credentials.rb
@@ -89,7 +89,8 @@ module ChefConfig
# Unknown profile name. For "default" just silently ignore, otherwise
# 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