Skip to content

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

@cb1kenobi

Description

@cb1kenobi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions