Skip to content

Commit 5fce1a1

Browse files
liudonghua123richardlau
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 46d6dce commit 5fce1a1

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
@@ -366,7 +366,8 @@ if errorlevel 1 (
366366
if "%target%" == "Clean" goto exit
367367

368368
:after-build
369-
rd %config%
369+
:: Check existence of %config% before removing it.
370+
if exist %config% rd %config%
370371
if errorlevel 1 echo "Old build output exists at 'out\%config%'. Please remove." & exit /B
371372
:: Use /J because /D (symlink) requires special permissions.
372373
if EXIST out\%config% mklink /J %config% out\%config%

0 commit comments

Comments
 (0)