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 <contact@viniciusl.com.br>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
liudonghua123 authored and targos committed Feb 15, 2024
1 parent cc37959 commit 85f63f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vcbuild.bat
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 85f63f3

Please sign in to comment.