Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shebang is not defined in 11.4.x #67

Closed
sridharmallela opened this issue Nov 28, 2017 · 0 comments
Closed

shebang is not defined in 11.4.x #67

sridharmallela opened this issue Nov 28, 2017 · 0 comments

Comments

@sridharmallela
Copy link

sridharmallela commented Nov 28, 2017

  • Version : 11.4.x
  • OS: Mac OS

With the latest version, using nyc throws an error for shebang, this is not happening with prior versions. The problem might be a typo with this commit . The code to reproduce this issue

Error

/git/nyc-spawn-wrap-issue-test/node_modules/nyc/node_modules/spawn-wrap/index.js:30
    shebang = '#!'
            ^
    ReferenceError: shebang is not defined
        at Object.<anonymous> (/git/nyc-spawn-wrap-issue-test/node_modules/nyc/node_modules/spawn-wrap/index.js:30:11)
        at Module._compile (module.js:635:30)
        at Object.Module._extensions..js (module.js:646:10)
        at Module.load (module.js:554:32)
        at tryModuleLoad (module.js:497:12)
        at Function.Module._load (module.js:489:3)
        at Module.require (module.js:579:17)
        at require (internal/module.js:11:18)
        at /.node-spawn-wrap-56825-9752b13600c7/node:167:17
        at Object.<anonymous> (/.node-spawn-wrap-56825-9752b13600c7/node:181:3)

Root Cause (may be an typo)

if (process.platform === 'os390')
  shebang = '#!/bin/env '
else
  shebang = '#!'

should be something like this

var  shebang =(process.platform === 'os390') ? '#!/bin/env ' : '#!'

I will submit a PR with the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant