From 08b0ca9645cc3c8bb3eb26d097ffc002ec070d28 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Thu, 16 May 2019 14:00:04 -0400 Subject: [PATCH] build,win: create junction instead of symlink to `out\%config%` PR-URL: https://github.com/nodejs/node/pull/27736 Reviewed-By: Richard Lau --- vcbuild.bat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index 807910d749cb89..4c84473558614e 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -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.