feat(windows): auto-update before exit after running installer

This commit is contained in:
AJ ONeal
2023-11-11 23:07:28 -07:00
parent 1af9db79bb
commit 693e91d275
+6
View File
@@ -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}"