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‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ if errorlevel 1 (
366366
if"%target%"=="Clean"gotoexit
367367

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

0 commit comments

Comments
(0)