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

Fix unset variable in installer #3158

Merged
merged 1 commit into from Oct 21, 2019
Merged

Fix unset variable in installer #3158

merged 1 commit into from Oct 21, 2019

Conversation

steshaw
Copy link
Member

@steshaw steshaw commented Oct 19, 2019

The p variable in the install script is not defined when NIX_INSTALLER_NO_MODIFY_PROFILE is set.

There is no error but the file to source after "please add the line" is empty:

$ NIX_INSTALLER_NO_MODIFY_PROFILE=y sh <(curl -s https://nixos.org/nix/install) --no-daemon
downloading Nix 2.3.1 binary tarball for x86_64-darwin from 'https://nixos.org/releases/nix/nix-2.3.1/nix-2.3.1-x86_64-darwin.tar.xz' to '/var/folders/5p/pg4tt29543q9myxxt9j1528m0000gn/T/nix-binary-tarball-unpack.mDl1TE2hFV'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17.1M  100 17.1M    0     0   331k      0  0:00:53  0:00:53 --:--:--  593k
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
performing a single-user installation of Nix...
copying Nix to /nix/store........................................
replacing old 'nix-2.3.1'
installing 'nix-2.3.1'
unpacking channels...

Installation finished!  To ensure that the necessary environment
variables are set, please add the line

  .

to your shell profile (e.g. ~/.profile).

Perhaps should also consider set -eu rather than just set -e at the top of the file? It doesn't seem to present any portability difficulties.

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it would be good to rename the variable to be more explicit of what it contains

@edolstra edolstra merged commit 37e45da into NixOS:master Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants