From 79d356909bd34ca52e44d44f279db784247b46d2 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 26 Oct 2018 09:10:28 +0100 Subject: [PATCH] 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. --- pkgs/darwin-installer/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/darwin-installer/default.nix b/pkgs/darwin-installer/default.nix index 638f2bb..3267071 100644 --- a/pkgs/darwin-installer/default.nix +++ b/pkgs/darwin-installer/default.nix @@ -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