Files
vim-ale/_webi/bootstrap.ps1
Stef Dunlap 6b21cc7245 fix(pwsh): use Env:HOME in bootstrap.ps1 to run from any directory
This fixes bug whereby one could only run webi from the home directory because it created the `.local\bin` in whatever directory it was run.
2022-03-07 07:55:01 +00:00

7 lines
462 B
PowerShell

# Download the latest webi, then install {{ exename }}
New-Item -Path "$Env:USERPROFILE\.local\bin" -ItemType Directory -Force | out-null
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
curl.exe -s -A "windows" "$Env:WEBI_HOST/packages/_webi/webi-pwsh.ps1" -o "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1"
Set-ExecutionPolicy -Scope Process Bypass
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" "{{ exename }}"