Fix unset variable in installer

(cherry picked from commit f0ec4b4ce478a8d2760203e8192275b88c770e1c)
This commit is contained in:
Steven Shaw 2019-10-19 13:25:18 +10:00 committed by Eelco Dolstra
parent 34bf1a8b5f
commit e1fb586138

View file

@ -141,11 +141,9 @@ if [ -z "$_NIX_INSTALLER_TEST" ]; then
fi fi
added= added=
p=$HOME/.nix-profile/etc/profile.d/nix.sh
if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then
# Make the shell source nix.sh during login. # Make the shell source nix.sh during login.
p=$HOME/.nix-profile/etc/profile.d/nix.sh
for i in .bash_profile .bash_login .profile; do for i in .bash_profile .bash_login .profile; do
fn="$HOME/$i" fn="$HOME/$i"
if [ -w "$fn" ]; then if [ -w "$fn" ]; then
@ -157,7 +155,6 @@ if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then
break break
fi fi
done done
fi fi
if [ -z "$added" ]; then if [ -z "$added" ]; then