git: 48a2c771bb3b - main - www/npm: Fix 'npm run' by removing extra '--'

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 04 Sep 2022 05:02:04 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=48a2c771bb3ba68c2d4d3d26cb9c282cc25a49b8

commit 48a2c771bb3ba68c2d4d3d26cb9c282cc25a49b8
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-09-04 05:01:45 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-09-04 05:01:45 +0000

    www/npm: Fix 'npm run' by removing extra '--'
    
    PR:             266159
---
 www/npm/Makefile            |  1 +
 www/npm/files/patch-npm-run | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/www/npm/Makefile b/www/npm/Makefile
index 4c1093ab603e..88e1c3ca88cb 100644
--- a/www/npm/Makefile
+++ b/www/npm/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	npm
 PORTVERSION=	8.18.0
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	LOCAL/sunpoet
 
diff --git a/www/npm/files/patch-npm-run b/www/npm/files/patch-npm-run
new file mode 100644
index 000000000000..58b5e25a9c72
--- /dev/null
+++ b/www/npm/files/patch-npm-run
@@ -0,0 +1,11 @@
+--- lib/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js.orig	2022-08-27 11:30:45 UTC
++++ lib/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
+@@ -67,7 +67,7 @@ const makeSpawnArgs = options => {
+   }
+   const spawnArgs = isCmd
+     ? ['/d', '/s', '/c', script]
+-    : ['-c', '--', script]
++    : ['-c', script]
+ 
+   const spawnOpts = {
+     env: spawnEnv,