-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Running scripts on systems with bash version older than v4 causes errors #680
Comments
@vasucp1207 can confirm but based on what I saw in the comments I am almost certain they are on Mac OS, which ships an ancient version of Bash by default (3.something, apparently for GPL-avoidance reasons) as well as BSD flavors of command line tools which differ from GNU versions. The missing Cargo.toml is likely due to a difference in Writing reliable cross-platform scripts can be a rather tedious rabbit hole to dive into but there are some easy things we can do without going too deep.
|
Great points! If you have a few minutes, would you care to open some PRs for the bash version check and the contributing guide suggestions? I'd be thrilled to merge them. |
#681 mostly addressed this — thank you @jw013! The only open question remaining is if we can do something about our incompatible use of If I correctly understand the suggested fix at the link you shared, it seems like we might be able to make a copy of the files we intend to edit with This is a bit hard for me to test since I don't have a Mac, so I'd love some help. If neither of you @jw013 and @vasucp1207 is up for trying a PR, I can try to whip something up next weekend if I have a bit of time. |
cargo-semver-checks/scripts/regenerate_test_rustdocs.sh: line 23: shopt: globstar: invalid shell option name
Originally posted by @vasucp1207 in #679 (comment)
The
globstar
option was introduced by Bash 4, released 15 years ago. Unfortunately, some systems still ship with only Bash 3 and will have this error.Our scripts should check the installed bash version and exit with an error if it's older than v4. If it's possible to accommodate other shells (e.g. zsh, fish, nushell, etc.), ideally we should do that as well.
The text was updated successfully, but these errors were encountered: