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

Bug: Remove checkShebangLine multi arguments check #5459

Closed
jonathan-rosa opened this issue Dec 6, 2023 · 1 comment
Closed

Bug: Remove checkShebangLine multi arguments check #5459

jonathan-rosa opened this issue Dec 6, 2023 · 1 comment

Comments

@jonathan-rosa
Copy link

Input Code

$ ./a.coffee aaa

a.coffee: (--no-header used as proof)

#!/usr/bin/env -S npx coffee --no-header
console.log process.argv

Expected Behavior

$ ./a.coffee aaa
[ 'coffee', '[...]/a.coffee', 'aaa' ]

Current Behavior

$ ./a.coffee aaa
The script to be run begins with a shebang line with more than one
argument. This script will fail on platforms such as Linux which only
allow a single argument.
The shebang line was: '#!/usr/bin/env -S npx coffee --no-header' in file '[...]/a.coffee'
The arguments were: ["-S","npx","coffee","--no-header"]
[ 'coffee', '[...]/a.coffee', 'aaa' ]

Possible Solution

Remove checkShebangLine in coffeescript.coffee as it's no longer necessary.

Context

Linux now allows multiple arguments since coreutils 8.30 (July 1st, 2018), this function can be removed now.

Environment

  • Debian GNU/Linux 12 (bookworm)
  • CoffeeScript version: 2.7.0
  • Node.js version: 18.13.0
@GeoffreyBooth
Copy link
Collaborator

As of 2023 there are still many Linux distros where it’s unsupported: nodejs/node#49295 (comment).

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

2 participants