Skip to content

Commit 85f63f3

Browse files
liudonghua123targos
authored andcommitted
build: check before removing %config% link
PR-URL: #51437 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent cc37959 commit 85f63f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vcbuild.bat

+2-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ if errorlevel 1 (
337337
if "%target%" == "Clean" goto exit
338338

339339
:after-build
340-
rd %config%
340+
:: Check existence of %config% before removing it.
341+
if exist %config% rd %config%
341342
if errorlevel 1 echo "Old build output exists at 'out\%config%'. Please remove." & exit /B
342343
:: Use /J because /D (symlink) requires special permissions.
343344
if EXIST out\%config% mklink /J %config% out\%config%

0 commit comments

Comments
 (0)