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

minor improvement to nix installation instructions #40521

Merged
merged 2 commits into from May 16, 2018
Merged

minor improvement to nix installation instructions #40521

merged 2 commits into from May 16, 2018

Conversation

wfranzini
Copy link
Contributor

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.

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.


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 &lt;(curl https://nixos.org/nix/install)
$ curl https://nixos.org/nix/install | bash
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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/.

@matthewbauer matthewbauer merged commit 205a9f2 into NixOS:master May 16, 2018
@matthewbauer
Copy link
Member

Awesome! Thank you

@Synthetica9
Copy link
Member

@matthewbauer This is still present in Hydra (Go to any build -> Actions -> Reproduce Build), should it also be patched there?

@matthewbauer
Copy link
Member

It might be worth changing. Not a priority though. There could be bashisms in the hydra script.

@Synthetica9
Copy link
Member

It would still help people using non-bash shells, even if it starts bash, I guess?

Synthetica9 added a commit to Synthetica9/hydra that referenced this pull request May 16, 2018
Replace `bash <(...)` with `... | bash`

See also: NixOS/nixpkgs#40521
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.

None yet

5 participants