summaryrefslogtreecommitdiff
path: root/lib/chef/train_transport.rb
diff options
context:
space:
mode:
authorMarc Chamberland <mchamberland@pbsc.com>2019-06-03 22:15:16 -0400
committerMarc Chamberland <mchamberland@pbsc.com>2019-06-03 23:05:49 -0400
commit7eda1e5bf3f71c00bd08bde20a03b817caf95095 (patch)
tree0c6ea467b4e4af4acbadf7ab777a7ef4bd19cb8e /lib/chef/train_transport.rb
parent8ab574c75ada5112b89149cc63b3a4f007664974 (diff)
downloadchef-7eda1e5bf3f71c00bd08bde20a03b817caf95095.tar.gz
more distro constants
Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
Diffstat (limited to 'lib/chef/train_transport.rb')
-rw-r--r--lib/chef/train_transport.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/train_transport.rb b/lib/chef/train_transport.rb
index 95b5018960..fdb4b5305a 100644
--- a/lib/chef/train_transport.rb
+++ b/lib/chef/train_transport.rb
@@ -17,6 +17,7 @@
require "chef-config/mixin/credentials"
require "train"
+require_relative "dist"
class Chef
class TrainTransport
@@ -76,8 +77,8 @@ class Chef
credentials_file =
if tm_config.credentials_file && File.exist?(tm_config.credentials_file)
tm_config.credentials_file
- elsif File.exist?(Chef::Config.platform_specific_path("/etc/chef/#{profile}/credentials"))
- Chef::Config.platform_specific_path("/etc/chef/#{profile}/credentials")
+ elsif File.exist?(Chef::Config.platform_specific_path("#{Chef::Dist::CONF_DIR}/#{profile}/credentials"))
+ Chef::Config.platform_specific_path("#{Chef::Dist::CONF_DIR}/#{profile}/credentials")
else
super
end