diff options
-rw-r--r-- | lib/chef/application/solo.rb | 2 | ||||
-rw-r--r-- | lib/chef/encrypted_data_bag_item.rb | 2 | ||||
-rw-r--r-- | lib/chef/shell.rb | 4 | ||||
-rw-r--r-- | lib/chef/train_transport.rb | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index 5831a07349..cda0852e13 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -34,7 +34,7 @@ class Chef::Application::Solo < Chef::Application::Base option :config_file, short: "-c CONFIG", long: "--config CONFIG", - default: "#{ChefConfig::Config.etc_chef_dir}/solo.rb", + default: Chef::Config.platform_specific_path("#{ChefConfig::Config.etc_chef_dir}/solo.rb"), description: "The configuration file to use." unless ChefUtils.windows? diff --git a/lib/chef/encrypted_data_bag_item.rb b/lib/chef/encrypted_data_bag_item.rb index f267b1c537..9cf1a71db2 100644 --- a/lib/chef/encrypted_data_bag_item.rb +++ b/lib/chef/encrypted_data_bag_item.rb @@ -130,7 +130,7 @@ class Chef::EncryptedDataBagItem require "open-uri" unless defined?(OpenURI) path ||= Chef::Config[:encrypted_data_bag_secret] unless path - raise ArgumentError, "No secret specified and no secret found at #{ChefConfig::Config.etc_chef_dir + "/encrypted_data_bag_secret"}" + raise ArgumentError, "No secret specified and no secret found at #{Chef::Config.platform_specific_path(ChefConfig::Config.etc_chef_dir) + "/encrypted_data_bag_secret"}" end secret = case path diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index 08016e97d5..a425129fa8 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -365,9 +365,9 @@ module Shell elsif dot_chef_dir && ::File.exist?(File.join(dot_chef_dir, ChefUtils::Dist::Infra::SHELL_CONF)) File.join(dot_chef_dir, ChefUtils::Dist::Infra::SHELL_CONF) elsif config[:solo_legacy_shell] - "#{ChefConfig::Config.etc_chef_dir}/solo.rb" + Chef::Config.platform_specific_path("#{ChefConfig::Config.etc_chef_dir}/solo.rb") elsif config[:client] - "#{ChefConfig::Config.etc_chef_dir}/client.rb" + Chef::Config.platform_specific_path("#{ChefConfig::Config.etc_chef_dir}/client.rb") elsif config[:solo_shell] Chef::WorkstationConfigLoader.new(nil, Chef::Log).config_location else diff --git a/lib/chef/train_transport.rb b/lib/chef/train_transport.rb index f2ab69921c..7d6539b416 100644 --- a/lib/chef/train_transport.rb +++ b/lib/chef/train_transport.rb @@ -77,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?("#{ChefConfig::Config.etc_chef_dir}/#{profile}/credentials") - "#{ChefConfig::Config.etc_chef_dir}/#{profile}/credentials" + elsif File.exist?(Chef::Config.platform_specific_path("#{ChefConfig::Config.etc_chef_dir}/#{profile}/credentials")) + Chef::Config.platform_specific_path("#{ChefConfig::Config.etc_chef_dir}/#{profile}/credentials") else super end |