Merge pull request #11541 from noamraph/fix-nix-profile-sh

nix-profile.sh.in: fix envvar condition
This commit is contained in:
Eelco Dolstra 2024-09-19 14:32:23 +02:00 committed by GitHub
commit cd5fc45524
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,9 @@
# This file is tested by tests/installer/default.nix.
if [ -n "$HOME" ] && [ -n "$USER" ]; then
if [ -n "${HOME-}" ] && [ -n "${USER-}" ]; then
# Set up the per-user profile.
if [ -n "$NIX_STATE_HOME" ]; then
if [ -n "${NIX_STATE_HOME-}" ]; then
NIX_LINK="$NIX_STATE_HOME/profile"
else
NIX_LINK="$HOME/.nix-profile"