build,win: create junction instead of symlink to `out\%config%`

PR-URL: https://github.com/nodejs/node/pull/27736
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
pull/27736/head
Refael Ackermann 2019-05-16 14:00:04 -04:00
parent eb32e383d8
commit a388f4d13a
1 changed files with 3 additions and 2 deletions

View File

@ -328,8 +328,9 @@ if "%target%" == "Clean" goto exit
:after-build
rd %config%
if errorlevel 1 echo "Old build output exists at 'out\%config%'. Please remove." & exit /B
if EXIST out\%config% mklink /D %config% out\%config%
if errorlevel 1 exit /B
:: Use /J because /D (symlink) requires special permissions.
if EXIST out\%config% mklink /J %config% out\%config%
if errorlevel 1 echo "Could not create junction to 'out\%config%'." & exit /B
:sign
@rem Skip signing unless the `sign` option was specified.