Windows PWSH setup fix (#29649)

A command in the script to make Spack accessible in PWSH was invoked with
multiple arguments when it in fact requires a single argument.
This commit is contained in:
John W. Parent 2022-03-22 12:42:21 -04:00 committed by GitHub
parent 9177f223c3
commit a14901f792
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,8 +37,8 @@ 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
Invoke-Expression "$py_exe $Env:SPACK_ROOT\bin\haspywin.py"
Invoke-Expression "$py_exe $Env:SPACK_ROOT\bin\spack external find python" | Out-Null
}
$Env:Path = "$Env:SPACK_ROOT\bin;$Env:Path"
@ -54,6 +54,6 @@ $command = 'function global:prompt
$pth = $(Convert-Path $(Get-Location)) | Split-Path -leaf
"[spack] PS $pth>"
}'
$bytes = [System.Text.Encoding]::Unicode.GetBytes($command)
$encoded_command = [Convert]::ToBase64String($bytes)
$bytesc = [System.Text.Encoding]::Unicode.GetBytes($command)
$encoded_command = [Convert]::ToBase64String($bytesc)
powershell.exe -NoLogo -encodedCommand $encoded_command -NoExit