File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -697,17 +697,25 @@ installNix() {
697697 "
698698 fi
699699 }
700+
701+ setupProfile () {
702+ # Modifying current runtime environment variables to use Nix.
703+ # Persistent changes are configured later.
704+ print " Launching $nix /etc/profile.d/nix.sh"
705+ # shellcheck source=/dev/null
706+ . " $nix /etc/profile.d/nix.sh"
707+ print " Left $nix /etc/profile.d/nix.sh"
708+ if ! " $nix /bin/nix-env" -i " $nix " ; then
709+ error "
710+
711+ Unable to install Nix into your default profile
712+ "
713+ fi
714+ }
700715}
701716
702717}
703718echo " performing a single-user installation of Nix..." >&2
704- . " $nix /etc/profile.d/nix.sh"
705-
706- if ! " $nix /bin/nix-env" -i " $nix " ; then
707- echo " $0 : unable to install Nix into your default profile" >&2
708- exit 1
709- fi
710-
711719# Install an SSL certificate bundle.
712720if [ -z " $NIX_SSL_CERT_FILE " ] || ! [ -f " $NIX_SSL_CERT_FILE " ]; then
713721 $nix /bin/nix-env -i " $cacert "
You can’t perform that action at this time.
0 commit comments