$ type npm
npm is hashed (/opt/nvm/versions/node/v10/bin/npm)
$ cat /opt/nvm/versions/node/v10/bin/npm
#!/usr/bin/env bash
set -e
err() { echo "$@" 1>&2; }
args=$@
while [[ "$1" =~ ^- ]]; do
shift
done
npm-real $args
what’s this from? it looks all weird. there’s an unused err function. it looks through the positional parameters but backs it up in $args and then never does anything with the filtered $@. and then it calls the real npm with kind-of-the-original args, but with quoting broken
Hi, so my apologies as this response is a long time coming - basically we acknowledge that this is a bug but we don’t expect to be able to prioritize it in the near future.
I see that the above reply is actually a coded message meaning “we’ve removed the wrapper and thus quoted arguments will now work as expected.”
$ head /opt/nvm/versions/node/v10/bin/npm
#!/usr/bin/env node
;(function () { // wrapper in case we're in module_context mode
// windows: running "npm blah" in this folder will invoke WSH, not node.
/* global WScript */
if (typeof WScript !== 'undefined') {
Hey, I was just passing on the information I was given. I’ll make sure that this is an intended change so that we don’t get blindsided if it gets reverted, though!
Okay, I’m back and I was just told that this ended up being fixed as part of another fix for another bug, so consider the wrapper officially removed! Sorry for the confusion, there!