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

stdenv/setup.sh: Add version check to setup script #108102

Merged
merged 1 commit into from Jun 24, 2021

Conversation

matthewbauer
Copy link
Member

Only bash 4+ works in setup.sh. To make sure this is obvious, we can
check BASH_VERSINFO to get the major version number of Bash.

While Bash 3 is pretty rare, it still comes stock in macOS.

We could provide a warning here for non-Bash shells, but it’s not
always clear whether they will work or not. Zsh should have no trouble
while busybox sh, fish, or any others. There’s no great way to detect
what feature set the shell supports.

Fixes #71625

@ofborg ofborg bot added the 6.topic: stdenv Standard environment label Jan 1, 2021
@SuperSandro2000
Copy link
Member

please target staging.

@mweinelt
Copy link
Member

mweinelt commented Feb 8, 2021

/rebase-staging

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2021

@matthewbauer matthewbauer changed the base branch from master to staging June 23, 2021 06:31
Only bash 4+ works in setup.sh. To make sure this is obvious, we can
check BASH_VERSINFO to get the major version number of Bash.

While Bash 3 is pretty rare, it still comes stock in macOS.

We *could* provide a warning here for non-Bash shells, but it’s not
always clear whether they will work or not. Zsh should have no trouble
while busybox sh, fish, or any others. There’s no great way to detect
what feature set the shell supports.

Fixes NixOS#71625
@matthewbauer
Copy link
Member Author

@worldofpeace Sorry for the delay! I've updated with your wording. Should be ready to merge, but I'll defer to someone else as this isn't exactly critical.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).

Result of nixpkgs-review pr 108102 run on x86_64-linux 1

1 package built:
  • stdenv

@SuperSandro2000 SuperSandro2000 merged commit d871186 into NixOS:staging Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"bad substitution" error on darwin
4 participants