istanbuljs / istanbuljs/spawn-wrap

shebang detection fails if it starts with `#!/usr/bin/env`

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.