From 70b4c72d351683cec01c5497109979f4bd168cd2 Mon Sep 17 00:00:00 2001 From: Justin Stoller Date: Mon, 23 Oct 2023 15:33:59 -0700 Subject: [PATCH] (maint) Only resolve environment dirs if versioned dirs are enabled The previous implementation would not set the resolved_path variable of an environment to the actual resolved path unless the "report_configured_environment" was set to false. This should not matter since the externalize_path method will check the "report_configured_environment" setting. The implementation should probably either always set the resolved_path to the resolved path, or only set it if "versioned_environment_dirs" is true. This patch sets it only if the "versioned_environment_dirs" setting is true. --- lib/puppet/environments.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/puppet/environments.rb b/lib/puppet/environments.rb index 5fd8527ba45..c600d174a43 100644 --- a/lib/puppet/environments.rb +++ b/lib/puppet/environments.rb @@ -246,10 +246,8 @@ def create_environment(name) configured_path = File.join(@environment_dir, name.to_s) env.configured_path = configured_path - if Puppet.settings[:report_configured_environmentpath] + if Puppet.settings[:versioned_environment_dirs] env.resolved_path = validated_directory(configured_path) - else - env.resolved_path = configured_path end env