From 52fc21b10f7c0a26c71734c41d7c1103fbdf8c40 Mon Sep 17 00:00:00 2001 From: Sheena Artrip Date: Sun, 24 Jan 2021 03:23:59 -0800 Subject: [PATCH] command-not-found: fix zsh exit code --- nixos/modules/programs/command-not-found/command-not-found.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/programs/command-not-found/command-not-found.nix b/nixos/modules/programs/command-not-found/command-not-found.nix index 656c255fcb1..d8394bf73a2 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.nix +++ b/nixos/modules/programs/command-not-found/command-not-found.nix @@ -80,6 +80,8 @@ in # Retry the command if we just installed it. if [ $? = 126 ]; then "$@" + else + return 127 fi else # Indicate than there was an error so ZSH falls back to its default handler