mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-19 03:56:16 +00:00
feature(windows): make it more clear that the user needs to update their PATH
This commit is contained in:
@@ -31,6 +31,11 @@ New-Item -Path .local\opt -ItemType Directory -Force | out-null
|
||||
|
||||
function webi_add_path
|
||||
{
|
||||
Write-Host ''
|
||||
Write-Host '*****************************' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host '* IMPORTANT - READ ME *' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host '*****************************' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host ''
|
||||
& "$Env:USERPROFILE\.local\bin\pathman.exe" add "$args[0]"
|
||||
# Note: not all of these work as expected, so we use the unix-style, which is most consistent
|
||||
#& "$Env:USERPROFILE\.local\bin\pathman.exe" add ~/.local/bin
|
||||
|
||||
+11
-1
@@ -59,7 +59,17 @@ if (!(Test-Path -Path .local\bin\pathman.exe))
|
||||
|
||||
# Run pathman to set up the folder
|
||||
# (using unix style path because... cmd vs powershell vs whatever)
|
||||
& "$Env:USERPROFILE\.local\bin\pathman.exe" add ~/.local/bin
|
||||
$has_local_bin = echo "$Env:PATH" | Select-String -Pattern '\.local.bin'
|
||||
if (!$has_local_bin)
|
||||
{
|
||||
Write-Host ''
|
||||
Write-Host '**********************************' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host '* IMPORTANT -- READ ME *' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host '* (run the PATH command below) *' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host '**********************************' -ForegroundColor red -BackgroundColor white
|
||||
Write-Host ''
|
||||
& "$Env:USERPROFILE\.local\bin\pathman.exe" add ~/.local/bin
|
||||
}
|
||||
|
||||
# {{ baseurl }}
|
||||
# {{ version }}
|
||||
|
||||
Reference in New Issue
Block a user