fix: Erlang bin path to user PATH, don't reinst
- 100MB download was running again, even if installed already - need to ensure the bin dir is in PATH for access to erl - Handle PATH manip in install and uninstall
This commit is contained in:
@@ -19,6 +19,14 @@ try
|
||||
}
|
||||
|
||||
Uninstall-ChocolateyPackage @uninstallParams
|
||||
|
||||
$binLocation = Join-Path $installPath 'bin'
|
||||
$userPaths = [Environment]::GetEnvironmentVariable('Path', 'User') -split ';' |
|
||||
? { ($_ -notmatch $binLocation) -and (![String]::IsNullOrEmpty($_)) } |
|
||||
Select-Object -Unique
|
||||
|
||||
[Environment]::SetEnvironmentVariable('Path', ($userPaths -join ';'), 'User')
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
}
|
||||
catch
|
||||
|
Reference in New Issue
Block a user