Skip to content

Commit

Permalink
build: check before removing %config% link
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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 marco-ippolito committed Jan 29, 2024
1 parent 78e9c5e commit d32ab08
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 d32ab08

Please sign in to comment.