summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpsakievich <psakiev@sandia.gov>2024-02-29 17:49:37 -0700
committerGitHub <noreply@github.com>2024-02-29 16:49:37 -0800
commit50ee3624c0de235a8ec5251da1e5297fc4f3f2cc (patch)
tree2862ad76bec0883bad7c83f8463b6e5b334ab1f4 /lib
parent2840cb54b58f321c61c848142602554395216963 (diff)
downloadspack-50ee3624c0de235a8ec5251da1e5297fc4f3f2cc.tar.gz
spack-50ee3624c0de235a8ec5251da1e5297fc4f3f2cc.tar.bz2
spack-50ee3624c0de235a8ec5251da1e5297fc4f3f2cc.tar.xz
spack-50ee3624c0de235a8ec5251da1e5297fc4f3f2cc.zip
Support environment variable expansion inside module projections (#42917)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/projections.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/spack/projections.py b/lib/spack/spack/projections.py
index b11c9c2a6d..acdb57b49c 100644
--- a/lib/spack/spack/projections.py
+++ b/lib/spack/spack/projections.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.util.path
+
def get_projection(projections, spec):
"""
@@ -11,7 +13,7 @@ def get_projection(projections, spec):
all_projection = None
for spec_like, projection in projections.items():
if spec.satisfies(spec_like):
- return projection
+ return spack.util.path.substitute_path_variables(projection)
elif spec_like == "all":
- all_projection = projection
+ all_projection = spack.util.path.substitute_path_variables(projection)
return all_projection