diff --git a/modules/programs/bash/command-not-found.nix b/modules/programs/bash/command-not-found.nix index 4eb11d3a1727..6549ba86810a 100644 --- a/modules/programs/bash/command-not-found.nix +++ b/modules/programs/bash/command-not-found.nix @@ -34,9 +34,12 @@ in # Retry the command if we just installed it. if [ $? = 126 ]; then "$@" + else + return 127 fi else echo "$1: command not found" >&2 + return 127 fi } '';