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
minor improvement to nix installation instructions #40521
minor improvement to nix installation instructions #40521
Conversation
in the command $ bash <(curl https://nixos.org/nix/install) <(..) is a bashism. The documentation now show a command that does not require to be executed by bash.
@@ -47,7 +47,7 @@ | |||
Short version: | |||
</para> | |||
<screen> | |||
$ bash <(curl https://nixos.org/nix/install) | |||
$ curl https://nixos.org/nix/install | bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just do sh
if we're trying to avoid bashisms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewbauer the motivation for the PR is not to avoid bashisms, just to make the
documentation correct even if the user 's shell is not bash. Since the command use bash
I've assumed the install script requires bash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should support generic sh. This matches the instruction on https://nixos.org/nix/.
Awesome! Thank you |
@matthewbauer This is still present in Hydra (Go to any build -> Actions -> Reproduce Build), should it also be patched there? |
It might be worth changing. Not a priority though. There could be bashisms in the hydra script. |
It would still help people using non-bash shells, even if it starts bash, I guess? |
Replace `bash <(...)` with `... | bash` See also: NixOS/nixpkgs#40521
in the command
<(..) is a bashism. The documentation now show a command that does
not require to be executed by bash.
Motivation for this change
Trying to install nix in an environment you have control over (think some cloud provider) fail if the
default shell is not bash. This change make a minor improvement in the documentation.