Update lib/spack/spack/environment/environment.py
Co-authored-by: Greg Becker <becker33@llnl.gov> Add back path canonicalization
This commit is contained in:
parent
490b5eef7c
commit
76fde639e8
@ -77,13 +77,12 @@
|
||||
#: Name of the directory where environments store repos, logs, views
|
||||
env_subdir_name = ".spack-env"
|
||||
|
||||
|
||||
def env_root_path():
|
||||
"""Override default root path if the user specified it"""
|
||||
config_path = spack.config.get("config:environments_root", default = None)
|
||||
if config_path:
|
||||
return config_path
|
||||
else:
|
||||
return env_path
|
||||
return spack.util.path.canonicalize_path(
|
||||
spack.config.get("config:environments_root", default=env_path), allow_env=False
|
||||
)
|
||||
|
||||
|
||||
def default_manifest_yaml():
|
||||
|
@ -1444,9 +1444,9 @@ def test_environment_created_in_users_location(mutable_config, tmpdir):
|
||||
assert tmpdir.strpath in env_dir
|
||||
assert not os.path.isdir(env_dir)
|
||||
os.makedirs(env_dir)
|
||||
env('create', 'test')
|
||||
out = env('list')
|
||||
assert 'test' in out
|
||||
env("create", "test")
|
||||
out = env("list")
|
||||
assert "test" in out
|
||||
|
||||
assert env_dir in ev.root('test')
|
||||
assert os.path.isdir(os.path.join(env_dir, 'test'))
|
||||
assert env_dir in ev.root("test")
|
||||
assert os.path.isdir(os.path.join(env_dir, "test"))
|
||||
|
Loading…
Reference in New Issue
Block a user