-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
alt bash path support #1013
alt bash path support #1013
Conversation
Signed-off-by: hackacad <[email protected]>
✅ DCO Check Passed fbc72c2 |
✅ Gradle Wrapper Validation success fbc72c2 |
✅ Gradle Precommit success fbc72c2 |
start gradle check |
So what could go wrong when changing |
Using env is the recommended way in POSIX. Using hard coded path to bash is a common issue (of course, there's a built-in shebang_fix in FreeBSD Makefile/built system, but using a env should make it more portable for every nix OS) (env should always be available on every UNIX/Linux at /usr/bin/env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @nknize for a quick second look, but this makes sense to me
just ftr: |
Let's then also fix anywhere we're not doing this in this PR? |
These are the tools that are necessary during/for runtime. |
I rethought the idea of using env for start-up scripts. In most cases, this should work, but I'm not aware of every use-case, especially in custom build Linux/Unix systems. |
I am going to go off https://unix.stackexchange.com/questions/206350/what-is-the-difference-if-i-start-bash-with-bin-bash-or-usr-bin-env-bash and adopt the more portable version that you're suggesting and merge this. Note that I read the concerns of malware preempting bash in PATH, if someone thinks those apply we can always reconsider and revert. If you have time, mind taking a look at all the other places we use |
We'll leave that ticket open. Making code portable is the first step, we don't want to be patching bash scripts during packaging unless we must. Next, if we're going to be releasing a FreeBSD version, we will need to be signing binaries and running the massive integration test suite on them, which is definitely possible but I can't promise timelines or releases. |
Signed-off-by: hackacad [email protected]
Description
Be more liberal about the location of bash
Issues Resolved
required for upstream FreeBSD support
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.