fix: cmd-shim not identified if placed outside node_modules/.bin/#158
fix: cmd-shim not identified if placed outside node_modules/.bin/#158patrickkfkan wants to merge 3 commits into
node_modules/.bin/#158Conversation
|
Revisiting this, I realize the I'll leave it to the project devs to decide what to do with this PR. |
Even back in 2024 when you wrote this, Node.js 14 had been not maintained for over one and a half year. And Node.js went out of support in 2019. I most certainly see the value in keeping support for older versions, even beyond the Node.js support window, however in this case I do not think updating Node.js version is a problem now in 2026. |
I have a node executable installed globally with
npm i -g. Because of this, the cmd-shim was not placed innode_modules/.bin/. On Windows, this causedcross-spawnto escape arguments only once.This PR inspects the contents of the target file and if it can obtain the wrapped command, it will take it as cmd-shim and escape arguments twice.