Skip to content

Commit ba41c26

Browse files
committed
Delay path expansion for parens in path
1 parent 9da9284 commit ba41c26

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

eng/helix/content/runtests.cmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@echo off
2-
REM Disable "!Foo!" expansions because they break the filter syntax
3-
setlocal disableextensions
2+
REM Need delayed expansion !PATH! so parens don't mess up the parens
3+
setlocal enableddelayedexpansion
44

55
REM Use '$' as a variable name prefix to avoid MSBuild variable collisions with these variables
66
set $target=%1
@@ -17,7 +17,7 @@ set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
1717
set DOTNET_MULTILEVEL_LOOKUP=0
1818
set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home
1919

20-
set "PATH=%DOTNET_ROOT%;%PATH%;%HELIX_CORRELATION_PAYLOAD%\node\bin"
20+
set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin
2121
echo Set path to: %PATH%
2222
echo "Installing SDK"
2323
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Version %$sdkVersion% -InstallDir %DOTNET_ROOT%"
@@ -34,7 +34,7 @@ if EXIST ".\Microsoft.AspNetCore.App" (
3434
dotnet nuget list source
3535
dotnet tool install dotnet-ef --global --version %$efVersion%
3636

37-
set "PATH=%PATH%;%DOTNET_CLI_HOME%\.dotnet\tools"
37+
set PATH=!PATH!;%DOTNET_CLI_HOME%\.dotnet\tools
3838
)
3939

4040
echo "Current Directory: %HELIX_WORKITEM_ROOT%"
@@ -66,6 +66,8 @@ if %$quarantined%==True (
6666
set %$quarantined=true
6767
)
6868

69+
REM Disable "!Foo!" expansions because they break the filter syntax
70+
setlocal disableextensions
6971
set NONQUARANTINE_FILTER="Quarantined!=true"
7072
set QUARANTINE_FILTER="Quarantined=true"
7173
if %$quarantined%==true (

0 commit comments

Comments
 (0)