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 line handling #62

Open
xenialaq opened this issue Dec 28, 2018 · 0 comments
Open

Shebang line handling #62

xenialaq opened this issue Dec 28, 2018 · 0 comments

Comments

@xenialaq
Copy link

xenialaq commented Dec 28, 2018

For a Node.js script (plus else) beginning with a shebang, with Enable Auto Adding Header on Saving turned on, file-header inserts comments before that line. For example:

#!/usr/bin/env node

// Code

becomes

/**
 * @Author: John Doe
 * @Date:   2000-01-01T00:00:00-05:00
 * @Last modified by:   jd
 * @Last modified time: 2000-01-01T00:00:00-05:00
 */


#!/usr/bin/env node

// Code

upon saving, and throws

#!/usr/bin/env node
^

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE

when started. Is it possible to handle #! in a different way?

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