Skip to content

Commit 08b0ca9

Browse files
refacktargos
authored andcommitted
build,win: create junction instead of symlink to out\%config%
PR-URL: #27736 Reviewed-By: Richard Lau <[email protected]>
1 parent 041b222 commit 08b0ca9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vcbuild.bat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,9 @@ if "%target%" == "Clean" goto exit
328328
:after-build
329329
rd %config%
330330
if errorlevel 1 echo "Old build output exists at 'out\%config%'. Please remove." & exit /B
331-
if EXIST out\%config% mklink /D %config% out\%config%
332-
if errorlevel 1 exit /B
331+
:: Use /J because /D (symlink) requires special permissions.
332+
if EXIST out\%config% mklink /J %config% out\%config%
333+
if errorlevel 1 echo "Could not create junction to 'out\%config%'." & exit /B
333334

334335
:sign
335336
@rem Skip signing unless the `sign` option was specified.

0 commit comments

Comments
 (0)