From 693e91d275e4ac20d09d816bb2793a2cd087cd46 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 11 Nov 2023 21:56:46 -0700 Subject: [PATCH] feat(windows): auto-update before exit after running installer --- webi/webi-pwsh.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webi/webi-pwsh.ps1 b/webi/webi-pwsh.ps1 index 6b089eb..5484f61 100644 --- a/webi/webi-pwsh.ps1 +++ b/webi/webi-pwsh.ps1 @@ -201,6 +201,12 @@ Invoke-DownloadUrl -Force -URL $PKG_URL -Params $UrlParams -Path $PkgInstallPwsh powershell $HOME\.local\tmp\${exename}.install.ps1 IF ($IsWebiParent) { + Write-Host "" + Write-Host "Checking for updates to Webi ..." + $WebiUrl = "${Env:WEBI_HOST}/packages/webi/webi-pwsh.ps1" + $WebiPath = "$HOME\.local\bin\webi-pwsh.ps1" + Invoke-DownloadUrl -Force -URL $WebiUrl -Path $WebiPath + $UserPath = [Environment]::GetEnvironmentVariable("Path", "User").Trim(';') $MachinePath = [Environment]::GetEnvironmentVariable("Path", "Machine").Trim(';') $Env:Path = "${UserPath};${MachinePath}"