Update build_env.py

Co-authored-by: John W. Parent <45471568+johnwparent@users.noreply.github.com>
This commit is contained in:
psakievich 2024-12-16 20:27:52 -07:00 committed by GitHub
parent 3f88278d48
commit b68b5811b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,7 @@ def test_pickle(tmpdir):
@pytest.mark.usefixtures("config", "mock_packages", "working_env")
def test_cd(cd_key, tmpdir, monkeypatch, capfd):
"""test that a subshell will navigate using spack cd before running commands"""
cmd = "pwd" if sys.platform != "win32" else "Get-Location"
cmd = "pwd" if sys.platform != "win32" else 'powershell.exe -Command "& {(Get-Location).Path}'
def mock_execvp(_, args):
"""os.execvp will kill take over the pytest process when it is successful"""