istanbuljs / istanbuljs/spawn-wrap
shebang detection fails if it starts with `#!/usr/bin/env`
Open
- Dominant language
- JavaScript
- Stars
- 41
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
When spawning `mocha` directly from `node_modules/.bin/mocha`, spawn-wrap will correctly detect it as a file containing a shebang. The shebang is `#!/usr/bin/env node`. The problem is spawn-wrap only checks the first segment to see if it's node.
`/usr/bin/env` is sort of a special case where we want to skip the first segment and test the second segment instead. Not sure of a good way of doing this without hardcoding it.
Contributor guide
Assessment
This issue has not been assessed yet.