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 <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent cc37959 commit 85f63f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vcbuild.bat

Lines changed: 2 additions & 1 deletion
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)