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

Execute bash from path in she-bang #1148

Merged
merged 1 commit into from
May 19, 2022
Merged

Conversation

timja
Copy link
Member

@timja timja commented May 19, 2022

macOS ships with bash 3.x and has no plans to update it.

At least prep.sh uses newer bash syntax.

It was hardcoded to use bin/bash in the she-bang which isn't recommended

I've updated it to look in the user's PATH instead

➜  bom git:(re-test-project-configure-page) ✗ /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
➜  bom git:(re-test-project-configure-page) ✗ bash --version
GNU bash, version 5.1.0(1)-release (x86_64-apple-darwin20.1.0)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@timja timja added the chore Reduces future maintenance label May 19, 2022
@timja timja enabled auto-merge (squash) May 19, 2022 08:16
@timja timja merged commit d8d96ba into jenkinsci:master May 19, 2022
@basil
Copy link
Member

basil commented May 19, 2022

NixOS users will be very pleased with this commit. 😄

@timja timja deleted the load-bash-from-path branch May 19, 2022 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Reduces future maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants