From 4d8602046ef613face5cb344b2403e6e40ad7224 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Wed, 27 Mar 2024 13:39:55 -0700 Subject: [PATCH] tools: install npm PowerShell scripts on Windows npm 9.8.0 added PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. Fixes: https://github.com/nodejs/node/issues/48471 Refs: https://github.com/npm/cli/pull/6548 PR-URL: https://github.com/nodejs/node/pull/52009 Reviewed-By: Luigi Pinca --- tools/msvs/msi/nodemsi/product.wxs | 10 ++++++++++ vcbuild.bat | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/tools/msvs/msi/nodemsi/product.wxs b/tools/msvs/msi/nodemsi/product.wxs index 991b8176554f0a..ff66ade6816aaa 100644 --- a/tools/msvs/msi/nodemsi/product.wxs +++ b/tools/msvs/msi/nodemsi/product.wxs @@ -88,8 +88,10 @@ Description="!(loc.npm_Description)"> + + @@ -224,6 +226,10 @@ + + + + @@ -232,6 +238,10 @@ + + + + diff --git a/vcbuild.bat b/vcbuild.bat index e1607504dcb7ee..122e6b86ecc74f 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -406,6 +406,10 @@ if not defined nonpm ( if errorlevel 1 echo Cannot copy npx && goto package_error copy /Y ..\deps\npm\bin\npx.cmd %TARGET_NAME%\ > nul if errorlevel 1 echo Cannot copy npx.cmd && goto package_error + copy /Y ..\deps\npm\bin\npm.ps1 %TARGET_NAME%\ > nul + if errorlevel 1 echo Cannot copy npm.ps1 && goto package_error + copy /Y ..\deps\npm\bin\npx.ps1 %TARGET_NAME%\ > nul + if errorlevel 1 echo Cannot copy npx.ps1 && goto package_error ) if not defined nocorepack (