mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 09:39:51 +00:00
ref(windows): use Sync-EnvPath to guarantee $Env:Path correctness
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
if (!(Get-Command "go.exe" -ErrorAction SilentlyContinue)) {
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" go
|
||||
# because we need git.exe to be available to golang immediately
|
||||
$Env:PATH = "$Env:USERPROFILE\go\bin;$Env:USERPROFILE\.local\opt\go\bin;$Env:PATH"
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
# Special to go: re-run all go tooling builds
|
||||
|
||||
@@ -12,8 +12,7 @@ $pkg_dst_bin = "$pkg_dst\bin"
|
||||
|
||||
if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) {
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" git
|
||||
# because we need git.exe to be available to golang immediately
|
||||
$Env:PATH = "$Env:USERPROFILE\.local\opt\git\cmd;$Env:PATH"
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
# Fetch archive
|
||||
|
||||
@@ -12,8 +12,7 @@ $pkg_dst_bin = "$pkg_dst\bin"
|
||||
|
||||
if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) {
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" git
|
||||
# because we need git.exe to be available to golang immediately
|
||||
$Env:PATH = "$Env:USERPROFILE\.local\opt\git\cmd;$Env:PATH"
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
# Fetch archive
|
||||
|
||||
@@ -30,12 +30,7 @@ IF (!(Test-Path -Path "$pkg_download")) {
|
||||
Write-Output "Checking for Go compiler..."
|
||||
IF (-Not (Get-Command -Name "go" -ErrorAction Silent)) {
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" go
|
||||
$Env:Path = "$HOME\.local\opt\go\bin;$Env:Path"
|
||||
$Env:Path = "$HOME\go\bin;$Env:Path"
|
||||
[System.Environment]::SetEnvironmentVariable(
|
||||
"Path",
|
||||
$env:Path,
|
||||
[System.EnvironmentVariableTarget]::User)
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
IF (!(Test-Path -Path "$pkg_src")) {
|
||||
|
||||
@@ -39,11 +39,7 @@ function fn_git_shallow_clone {
|
||||
Write-Output "Checking for Git..."
|
||||
IF (-Not (Get-Command -Name "git" -ErrorAction Silent)) {
|
||||
& "$HOME\.local\bin\webi-pwsh.ps1" git
|
||||
$Env:Path = "$HOME\.local\opt\git\cmd;$Env:Path"
|
||||
[System.Environment]::SetEnvironmentVariable(
|
||||
"Path",
|
||||
$env:Path,
|
||||
[System.EnvironmentVariableTarget]::User)
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
Write-Output "Cloning $Env:PKG_NAME from $Env:WEBI_PKG_URL to $pkg_src"
|
||||
|
||||
@@ -39,11 +39,7 @@ function fn_git_shallow_clone {
|
||||
Write-Output "Checking for Git..."
|
||||
IF (-Not (Get-Command -Name "git" -ErrorAction Silent)) {
|
||||
& "$HOME\.local\bin\webi-pwsh.ps1" git
|
||||
$Env:Path = "$HOME\.local\opt\git\cmd;$Env:Path"
|
||||
[System.Environment]::SetEnvironmentVariable(
|
||||
"Path",
|
||||
$env:Path,
|
||||
[System.EnvironmentVariableTarget]::User)
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
Write-Output "Cloning $Env:PKG_NAME from $Env:WEBI_PKG_URL to $pkg_src"
|
||||
|
||||
@@ -23,12 +23,7 @@ $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
Write-Output "Checking for Go compiler..."
|
||||
IF (-Not (Get-Command -Name "go" -ErrorAction Silent)) {
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" go
|
||||
$Env:Path = "$HOME\.local\opt\go\bin;$Env:Path"
|
||||
$Env:Path = "$HOME\go\bin;$Env:Path"
|
||||
[System.Environment]::SetEnvironmentVariable(
|
||||
"Path",
|
||||
$env:Path,
|
||||
[System.EnvironmentVariableTarget]::User)
|
||||
$null = Sync-EnvPath
|
||||
}
|
||||
|
||||
# Fetch archive
|
||||
|
||||
Reference in New Issue
Block a user