[Bug 266159] www/npm: fails to run commands after upgrade to 8.18.0

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 01 Sep 2022 15:37:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266159

            Bug ID: 266159
           Summary: www/npm: fails to run commands after upgrade to 8.18.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: https://github.com/npm/run-script/issues/103
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: madpilot@FreeBSD.org
          Assignee: sunpoet@FreeBSD.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)

Created attachment 236289
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=236289&action=edit
patch v1

Hi,

I've discovered I'm unable to perform normal "npm run" tasks after the upgrade.

Turns out it is a bug introduces upstream with v 8.17.0:

https://github.com/npm/run-script/issues/103

As stated there this is caused by this pull request:

https://github.com/npm/run-script/pull/98

which adds a '--' argument to shell invocations like: 'sh -c -- echo "foo"'

https://github.com/npm/run-script/blob/2a1854aaf0b788817ad5a45b329dbf3e842430f7/lib/make-spawn-args.js#L70


These fail due to no "--" command existing.

I
'm proposing a patch removing the -- from the sh command line. Unluckily I
don't think it is upstreamable in this way.

I'm running successfully with this patch locally.

Thanks in advance!

-- 
You are receiving this mail because:
You are the assignee for the bug.