1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-11-13 04:56:53 +03:00

installer: don't use pure PATH for editor

For the rest of the installer we want to make sure nothing installed by
the user interferes, however a user's editor might be installed
anywhere.
This commit is contained in:
Daiderd Jordan 2018-10-26 09:10:28 +01:00
parent e6a698a701
commit 79d356909b
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -24,6 +24,7 @@ stdenv.mkDerivation {
shellHook = ''
set -e
_PATH=$PATH
export PATH=/nix/var/nix/profiles/default/bin:${nix}/bin:${pkgs.openssh}/bin:/usr/bin:/bin:/usr/sbin:/sbin
action=switch
@ -58,7 +59,7 @@ stdenv.mkDerivation {
read -p "Would you like edit the default configuration.nix before starting? [y/n] " i
case "$i" in
y|Y)
''${EDITOR:-nano} "$config"
PATH=$_PATH ''${EDITOR:-nano} "$config"
;;
esac
fi