View location resolve environment variables (#20420)

This commit is contained in:
psakievich 2020-12-17 11:25:08 -07:00 committed by GitHub
parent 888c456ece
commit 093a247b25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,7 @@
import spack.util.lock as lk
from spack.util.path import substitute_path_variables
from spack.installer import PackageInstaller
import spack.util.path
#: environment variable used to indicate the active environment
spack_env_var = 'SPACK_ENV'
@ -468,7 +469,7 @@ class ViewDescriptor(object):
def __init__(self, base_path, root, projections={}, select=[], exclude=[],
link=default_view_link):
self.base = base_path
self.root = root
self.root = spack.util.path.canonicalize_path(root)
self.projections = projections
self.select = select
self.select_fn = lambda x: any(x.satisfies(s) for s in self.select)