Skip to content

Commit

Permalink
build: check before remove %config%
Browse files Browse the repository at this point in the history
  • Loading branch information
liudonghua123 committed Jan 14, 2024
1 parent f200a85 commit 62c3e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ if errorlevel 1 (
if "%target%" == "Clean" goto exit

:after-build
:: Suppress "The system cannot find the file specified." on every clean build.
rd %config% > nul 2> nul
:: Check existence of %config% before remove 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 62c3e0a

Please sign in to comment.