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

Backport 2194: Fix undefined variable references in installer and nix-daemon profile. #2195

Merged
merged 2 commits into from May 30, 2018

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented May 30, 2018

If the profile is sourced inside a script with `set -u`, the check for
__ETC_PROFILE_NIX_SOURCED and NIX_SSL_CERT_FILE would raise an error.
A simple guard around this check allows the script to operate under
standard environments (where it is fairly reasonable to assume USER
and HOME are set.)

(cherry picked from commit d459d33)
@grahamc grahamc requested a review from edolstra May 30, 2018 14:58
@grahamc
Copy link
Member Author

grahamc commented May 30, 2018

I've now built this installer on macOS and ran it, under the following scenarios:

No NIX variables:

$ env | grep NIX | wc -l
0

cert file set to an empty string:

$ env | grep NIX
NIX_SSL_CERT_FILE=

set to a bogus file:

$ env | grep NIX
NIX_SSL_CERT_FILE=bogusfile

set to a bogus file which exists but isn't certs :)

$ env | grep NIX
NIX_SSL_CERT_FILE=/Users/grahamc/test.c

and they all behaved as expected.

(reposted from #2194 (comment))

@edolstra edolstra merged commit 9f820e5 into NixOS:2.0-maintenance May 30, 2018
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

2 participants