gradle / gradle-enterprise-build-validation-scripts

Executable scripts to assist in validating that your Gradle and Maven builds are in an optimal state in terms of maximizing work avoidance when using Develocity.
https://gradle.com/develocity
Apache License 2.0
77 stars 23 forks source link

Fix running argbash on MacOS #609

Closed jthurne closed 2 months ago

jthurne commented 2 months ago

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.