class ChefConfig::WorkstationConfigLoader
def chef_config_dir
def chef_config_dir if @chef_config_dir.nil? @chef_config_dir = false full_path = working_directory.split(File::SEPARATOR) (full_path.length - 1).downto(0) do |i| candidate_directory = File.join(full_path[0..i] + [ChefUtils::Dist::Infra::USER_CONF_DIR]) if File.exist?(candidate_directory) && File.directory?(candidate_directory) @chef_config_dir = candidate_directory break end end end @chef_config_dir end