Skip to content

Commit

Permalink
build: check before removing %config% link
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
liudonghua123 authored Jan 25, 2024
1 parent ad5e2da commit b9a4279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ if errorlevel 1 (
if "%target%" == "Clean" goto exit

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

0 comments on commit b9a4279

Please sign in to comment.