From 1c1989e3330da3f6bf146108eb85aee1c1e1b45e Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 16 Jul 2023 14:56:40 +0800 Subject: [PATCH] Merge: d14b0d5319 b01786ef2c Merge branch 'main' into dev --- setup.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.ps1 b/setup.ps1 index eb70a6a8fb..165b85e117 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -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')