From 4e92e3b69ae6d7c14acb5c4d869eec12e1279f07 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 28 Jun 2020 12:48:29 +0000 Subject: [PATCH] win: bugfix Env:WEBI_HOST in webi.ps1 --- _webi/template.ps1 | 3 +++ _webi/webi.ps1 | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/_webi/template.ps1 b/_webi/template.ps1 index 1ccc5c6..dc0699d 100644 --- a/_webi/template.ps1 +++ b/_webi/template.ps1 @@ -31,6 +31,9 @@ if (!(Test-Path -Path .local\opt)) # {{ baseurl }} # {{ version }} +# Run pathman to set up the folder +& "$Env:USERPROFILE\.local\bin\pathman.exe" add "$Env:USERPROFILE\.local\.bin" + {{ installer }} # Done diff --git a/_webi/webi.ps1 b/_webi/webi.ps1 index 3e30242..7ec0c1d 100644 --- a/_webi/webi.ps1 +++ b/_webi/webi.ps1 @@ -26,6 +26,13 @@ if (!(Test-Path -Path .local\tmp)) New-Item -Path .local\tmp -ItemType Directory } +# TODO SetStrictMode +# TODO Test-Path variable:global:Env:WEBI_HOST ??? +IF(!$Env:WEBI_HOST) +{ + $Env:WEBI_HOST = "https://webinstall.dev" +} + if (!(Test-Path -Path .local\bin\pathman.exe)) { & curl.exe -fsSL -A "$Env:WEBI_UA" "$Env:WEBI_HOST/packages/pathman/install.ps1" -o .\.local\tmp\pathman-setup.ps1 -- 2.25.1