Support environment variable expansion inside module projections (#42917)
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user