fix(windows): 'powershell -File ...' to work with $HOME with spaces

This commit is contained in:
AJ ONeal
2024-01-11 14:44:21 -07:00
parent 73c5ea082c
commit 379a301bf3
3 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ function Repair-MissingCommand {
Return
}
& $HOME\.local\bin\webi-pwsh.ps1 $Package
& "$HOME\.local\bin\webi-pwsh.ps1" $Package
$null = Sync-EnvPath
}

View File

@@ -15,7 +15,7 @@ function Repair-MissingCommand {
Return
}
& $HOME\.local\bin\webi-pwsh.ps1 $Package
& "$HOME\.local\bin\webi-pwsh.ps1" $Package
$null = Sync-EnvPath
}
@@ -47,7 +47,7 @@ function Install-PwshEssential {
Repair-MissingCommand -Name "PowerShell Core" -Package "pwsh" -Command "pwsh"
# Fetch PSScriptAnalyzer (fmt, lint, fix)
& $HOME\.local\bin\webi-pwsh.ps1 psscriptanalyzer
& "$HOME\.local\bin\webi-pwsh.ps1" psscriptanalyzer
# Fetch shorthand commands to fmt, lint, & fix
$ScriptNames = , "pwsh-fmt", "pwsh-fix", "pwsh-lint"

View File

@@ -199,7 +199,7 @@ $UrlParams = "formats=zip,exe,tar,git&libc=msvc"
$PkgInstallPwsh = "$HOME\.local\tmp\$exename.install.ps1"
Invoke-DownloadUrl -Force -URL $PKG_URL -Params $UrlParams -Path $PkgInstallPwsh
powershell $HOME\.local\tmp\${exename}.install.ps1
powershell -File "$HOME\.local\tmp\${exename}.install.ps1"
IF ($IsWebiParent) {
Write-Host ""