summaryrefslogtreecommitdiff
path: root/share/spack/setup-env.ps1
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2023-04-21 09:58:37 -0400
committerGitHub <noreply@github.com>2023-04-21 08:58:37 -0500
commit5c742d4f2ba3478564df51cc353fffc5604629d7 (patch)
treef713a01c1eb38c22830ea2e32d1e94738cb3ccd5 /share/spack/setup-env.ps1
parentc64ca978779bd2eadcbc6fec8e258fca26e1d49a (diff)
downloadspack-5c742d4f2ba3478564df51cc353fffc5604629d7.tar.gz
spack-5c742d4f2ba3478564df51cc353fffc5604629d7.tar.bz2
spack-5c742d4f2ba3478564df51cc353fffc5604629d7.tar.xz
spack-5c742d4f2ba3478564df51cc353fffc5604629d7.zip
Hraden Spack's powershell interface (#37079)
Paths with spaces are an issue on Windows and our current powershell scripts are not sufficiently hardended against their use. This PR removes promlematic commandlets that do not work well with paths with spaces and adds escape quotes in other areas where this could be an issue.
Diffstat (limited to 'share/spack/setup-env.ps1')
-rw-r--r--share/spack/setup-env.ps13
1 files changed, 1 insertions, 2 deletions
diff --git a/share/spack/setup-env.ps1 b/share/spack/setup-env.ps1
index a077cef258..edf9613ec5 100644
--- a/share/spack/setup-env.ps1
+++ b/share/spack/setup-env.ps1
@@ -37,8 +37,7 @@ if (!$null -eq $py_path)
if (!$null -eq $py_exe)
{
- Invoke-Expression "$py_exe $Env:SPACK_ROOT\bin\haspywin.py"
- Invoke-Expression "$py_exe $Env:SPACK_ROOT\bin\spack external find python" | Out-Null
+ & "$py_exe" "$Env:SPACK_ROOT\bin\haspywin.py"
}
$Env:Path = "$Env:SPACK_ROOT\bin;$Env:Path"