From 6b21cc72452730c5f1cd5cd27ce04e3aebb8a34d Mon Sep 17 00:00:00 2001 From: Stef Dunlap Date: Wed, 2 Feb 2022 15:44:27 -0500 Subject: [PATCH] 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. --- _webi/bootstrap.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_webi/bootstrap.ps1 b/_webi/bootstrap.ps1 index b6ebd84..f61c3dd 100644 --- a/_webi/bootstrap.ps1 +++ b/_webi/bootstrap.ps1 @@ -1,5 +1,5 @@ # Download the latest webi, then install {{ exename }} -New-Item -Path .local\bin -ItemType Directory -Force | out-null +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