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

Fix running argbash on MacOS #609

Merged
merged 1 commit into from
May 3, 2024
Merged

Fix running argbash on MacOS #609

merged 1 commit into from
May 3, 2024

Conversation

jthurne
Copy link
Member

@jthurne jthurne commented May 2, 2024

argbash uses #!/bin/bash. On MacOS, this means the MacOS version of bash will
be used. This wasn't a problem in the past, but it appears to be an issue now
(maybe because of a change to one of the recent Gradle versions, or maybe
because of a recent MacOS update). When MacOS bash was used, argbash would fail
with a syntax error. This is because it uses bash features that are not
available in the MacOS version of bash.

The solution is to use /usr/bin/env bash to invoke argbash, which then uses
whatever version of bash is first on the system path. For MacOS developers,
this will be a more recent GNU version of bash.

argbash uses `#!/bin/bash`. On MacOS, this means the MacOS version of bash will
be used. This wasn't a problem in the past, but it appears to be an issue now
(maybe because of a change to one of the recent Gradle versions, or maybe
because of a recent MacOS update). When MacOS bash was used, argbash would fail
with a syntax error. This is because it uses bash features that are not
available in the MacOS version of bash.

The solution is to use /usr/bin/env bash to invoke argbash, which then uses
whatever version of bash is first on the system path. For MacOS developers,
this will be a more recent GNU version of bash.
@jthurne jthurne requested a review from erichaagdev May 2, 2024 09:43
@jthurne jthurne merged commit a79cf14 into main May 3, 2024
5 checks passed
@jthurne jthurne deleted the jhurne/fix-build-on-macos branch May 3, 2024 06:38
jthurne added a commit that referenced this pull request May 3, 2024
* origin/main:
  Bump com.google.guava:guava from 33.1.0-jre to 33.2.0-jre (#611)
  Fix running argbash on MacOS (#609)
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

Successfully merging this pull request may close these issues.

2 participants