tapjs
tapjs copied to clipboard
[BUG] Cannot `tap plugin add` on Windows
Is there an existing issue for this?
- [X] I have searched the existing issues
Have you read the CONTRIBUTING
guide on posting bugs, and CODE_OF_CONDUCT
?
- [X] yes I read the things
This issue exists in the latest tap version
- [X] I am using the latest tap
Description
You can't use tap plugin add
on Windows. You can still add plugins manually.
Fails with npm ENOENT
, simply because it's npm.cmd
on Windows.
Solution: use cross-spawn
instead of Node's built-in spawn.
Reproduction
- Run
tap plugin add @tapjs/clock
Environment
which tap
npm ls tap
tap versions
tap config list
tap plugin list
# if using typescript:
npm ls @isaacs/ts-node-temp-fork-for-pr-2009
npm ls typescript
# posix:
uname -a
# windows (in powershell)
"$([Environment]::OSVersion.VersionString) $(('x86', 'x64')[[Environment]::Is64BitOperatingSystem])"
Actually, we don't make the call to spawn
ourselves here as it's passed off to foreground-child
. This is probably an upstream issue then? or maybe we should be doing a manual check ourselves there.