[MNG-6850] Prevent printing the EXEC_DIR when it's just a disk letter

This fixes following bug and also consistent with another 'cd /d "%EXEC_DIR%"' a few lines above.
When you're on the root of some disk running mvn.cmd prints an extra line with current dir before the correct output

Closes #304
This commit is contained in:
Rostislav Krasny 2020-01-01 01:07:26 +02:00 committed by Michael Osipov
parent 863f9193e6
commit 42c99b45e4
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ goto endDetectBaseDir
:baseDirNotFound
if "_%EXEC_DIR:~-1%"=="_\" set "EXEC_DIR=%EXEC_DIR:~0,-1%"
set "MAVEN_PROJECTBASEDIR=%EXEC_DIR%"
cd "%EXEC_DIR%"
cd /d "%EXEC_DIR%"
:endDetectBaseDir