Change name of variable

This commit is contained in:
psakiev 2022-09-27 22:17:29 -06:00
parent da7294cd90
commit ef43044672
2 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@
#: default path where environments are stored in the spack tree #: default path where environments are stored in the spack tree
env_path = os.path.join(spack.paths.var_path, "environments") default_env_path = os.path.join(spack.paths.var_path, "environments")
#: Name of the input yaml file for an environment #: Name of the input yaml file for an environment
@ -81,7 +81,7 @@
def env_root_path(): def env_root_path():
"""Override default root path if the user specified it""" """Override default root path if the user specified it"""
return spack.util.path.canonicalize_path( return spack.util.path.canonicalize_path(
spack.config.get("config:environments_root", default=env_path), allow_env=False spack.config.get("config:environments_root", default=default_env_path), allow_env=False
) )

View File

@ -1493,11 +1493,11 @@ def get_rev():
@pytest.fixture() @pytest.fixture()
def mutable_mock_env_path(tmpdir_factory): def mutable_mock_env_path(tmpdir_factory):
"""Fixture for mocking the internal spack environments directory.""" """Fixture for mocking the internal spack environments directory."""
saved_path = ev.environment.env_path saved_path = ev.environment.default_env_path
mock_path = tmpdir_factory.mktemp("mock-env-path") mock_path = tmpdir_factory.mktemp("mock-env-path")
ev.environment.env_path = str(mock_path) ev.environment.default_env_path = str(mock_path)
yield mock_path yield mock_path
ev.environment.env_path = saved_path ev.environment.default_env_path = saved_path
@pytest.fixture() @pytest.fixture()