From 2f328c0694c350d85eb1e9f7fd3516bcc808a153 Mon Sep 17 00:00:00 2001 From: liudonghua Date: Mon, 15 Jan 2024 12:45:09 +0000 Subject: [PATCH] build: check before removing %config% link --- vcbuild.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index d093138b31c6a4..c3852c89cc5e18 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -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%