From 7eda1e5bf3f71c00bd08bde20a03b817caf95095 Mon Sep 17 00:00:00 2001 From: Marc Chamberland Date: Mon, 3 Jun 2019 22:15:16 -0400 Subject: more distro constants Signed-off-by: Marc Chamberland --- lib/chef/train_transport.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/chef/train_transport.rb') 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 -- cgit v1.2.1