mirror of https://github.com/axmolengine/axmol.git
Invert if condition checking for existence of the axmol bin path in the user path env variable (#1275)
Make list mutable to allow for inserting new path
This commit is contained in:
parent
1daf87c768
commit
b01786ef2c
|
@ -21,8 +21,8 @@ if ($IsWin) {
|
|||
}
|
||||
|
||||
$pathList = [System.Collections.ArrayList]$env:PATH.Split(';')
|
||||
if (!$pathList.IndexOf($AX_CONSOLE_BIN) -eq -1) {
|
||||
$pathList = [Environment]::GetEnvironmentVariable('PATH', 'User').Split(';')
|
||||
if ($pathList.IndexOf($AX_CONSOLE_BIN) -eq -1) {
|
||||
$pathList = [System.Collections.ArrayList][Environment]::GetEnvironmentVariable('PATH', 'User').Split(';')
|
||||
$pathList.Insert(0, $AX_CONSOLE_BIN)
|
||||
$PATH = $pathList -join ';'
|
||||
[Environment]::SetEnvironmentVariable('PATH', $PATH, 'User')
|
||||
|
|
Loading…
Reference in New Issue