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

Bear Proposal: ShebangBear #1932

Open
coala-bot opened this issue Jul 16, 2017 · 2 comments · May be fixed by #1937
Open

Bear Proposal: ShebangBear #1932

coala-bot opened this issue Jul 16, 2017 · 2 comments · May be fixed by #1937
Assignees

Comments

@coala-bot
Copy link

coala-bot commented Jul 16, 2017

Create a bear that enforces the usage of /usr/bin/env instead of directly calling it like /usr/bin/python3. The reason why /usr/bin/env is important because it'll find the correct path for the binary we wanna use. Not every distribution follows Linux's FHS (ex. macOS, GNU Guix, Nix OS, etc).

An extreme example of this is how portability is reduced on BSD (or installs of Slackware) because /usr is usually filled with programs that are installed by default and everything else is on /usr/local.

Note: Yes, it is called Shebang. https://en.wikipedia.org/wiki/Shebang_(Unix)

Opened via gitter by @yukiisbored

@AMR-KELEG
Copy link
Contributor

AMR-KELEG commented Jul 20, 2017

Would it be enough to check the first line and ensure that it is #!/usr/bin/env ?

@AMR-KELEG AMR-KELEG linked a pull request Jul 20, 2017 that will close this issue
2 tasks
@Makman2
Copy link
Member

Makman2 commented Jul 20, 2017

shebang has to be in the first line, so yes :) @AMR-KELEG
you can read about some official shebang "standards"/behaviour in the wikipedia entry: https://en.wikipedia.org/wiki/Shebang_(Unix)

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

Successfully merging a pull request may close this issue.

4 participants