Closed tamzinblake closed 7 years ago
How can npx itself do anything about this, itself? The update-notifier
calls that require isGlobal
are for those libraries themselves, not for npx. I can set it in npx itself, but that wouldn't necessarily fix this since npx is very much meant to be a unique global install.
If I'm not mistaken, on this line https://github.com/zkat/npx/blob/612f7ab66c8ad979251178b285f2a7d6e5a61a00/index.js#L71
We could pass the option isGlobal
set to whether the package we're notifying about is global (if npx knows that at the time which I haven't determined)
No, that line only applies to npx's own notifier. It won't affect the packages it's running. :/
:sadface:
See https://github.com/yeoman/update-notifier/issues/112
In this example, npx is using the locally-installed version of bower (node_modules/.bin/bower). update-notifier is correctly noticing that we're not using the latest version, but it suggests that npm i -g bower will fix that, which it will not, since it'll still use the locally-installed version, which is old.
For now, npx could probably fix this problem by setting isGlobal to the appropriate value in update-notifier?
https://github.com/yeoman/update-notifier#isglobal