From 80ea345494b8411902ad41fa2bdc9b31a8dadc36 Mon Sep 17 00:00:00 2001 From: obadz Date: Sun, 4 Mar 2018 15:56:38 +0000 Subject: [PATCH] nixos-enter: specify absolute path to bash Not doing so makes it impossible to use nixos-enter from a non-NixOS distro --- nixos/modules/installer/tools/nixos-enter.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-enter.sh b/nixos/modules/installer/tools/nixos-enter.sh index 122d9fdcd29..67939118961 100644 --- a/nixos/modules/installer/tools/nixos-enter.sh +++ b/nixos/modules/installer/tools/nixos-enter.sh @@ -15,8 +15,8 @@ else fi mountPoint=/mnt -command=("bash" "--login") system=/nix/var/nix/profiles/system +command=($system/sw/bin/bash "--login") while [ "$#" -gt 0 ]; do i="$1"; shift 1 @@ -32,7 +32,7 @@ while [ "$#" -gt 0 ]; do exit 1 ;; --command|-c) - command=("bash" "-c" "$1") + command=($system/sw/bin/bash "-c" "$1") shift 1 ;; --)