diff --git a/src/native/corehost/build.cmd b/src/native/corehost/build.cmd index e5f535467ad38b..ff40b5048a66be 100644 --- a/src/native/corehost/build.cmd +++ b/src/native/corehost/build.cmd @@ -5,7 +5,7 @@ setlocal :: Initialize the args that will be passed to cmake set "__sourceDir=%~dp0" :: remove trailing slash -if %__sourceDir:~-1%==\ set "__ProjectDir=%__sourceDir:~0,-1%" +if "%__sourceDir:~-1%"=="\" set "__sourceDir=%__sourceDir:~0,-1%" set "__RepoRootDir=%__sourceDir%\..\..\.." :: normalize