Skip to content

Commit 79efff7

Browse files
committed
build: check before remove %config%
1 parent f200a85 commit 79efff7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vcbuild.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ if errorlevel 1 (
337337
if "%target%" == "Clean" goto exit
338338

339339
:after-build
340-
:: Suppress "The system cannot find the file specified." on every clean build.
341-
rd %config% > nul 2> nul
340+
:: Check existence of %config% before removing it.
341+
if exist %config% rd %config%
342342
if errorlevel 1 echo "Old build output exists at 'out\%config%'. Please remove." & exit /B
343343
:: Use /J because /D (symlink) requires special permissions.
344344
if EXIST out\%config% mklink /J %config% out\%config%

0 commit comments

Comments
 (0)