From c3ea50a6de2fe1ad49796e7ff7ffb95e5aa07518 Mon Sep 17 00:00:00 2001 From: aabccd021 Date: Wed, 9 Nov 2022 16:59:10 +0700 Subject: [PATCH] fix(direnvrc): log when nix-shell not found --- direnvrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direnvrc b/direnvrc index 8683cf5..5b22206 100644 --- a/direnvrc +++ b/direnvrc @@ -11,6 +11,10 @@ _nix_direnv_preflight () { if [[ -z ${NIX_BIN_PREFIX:-} ]]; then NIX_BIN_PREFIX=$(command -v nix-shell) + if [[ -z "${NIX_BIN_PREFIX}" ]]; then + log_status "nix-direnv: command not found: nix-shell." + exit 1 + fi NIX_BIN_PREFIX="${NIX_BIN_PREFIX%/*}/" fi