From a9f769866c6a73f6e26e42b0973bf4c7cecaaca5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 28 Jun 2025 18:50:33 +0200 Subject: modules/nix-index/command_not_found: Avoid using a non-existing command The `eprintln` was previously supplied (impurely) by my shell library, and without it, the command-not-found handler goes into infinite recursion. --- modules/by-name/ni/nix-index/command_not_found.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/by-name/ni/nix-index/command_not_found.sh') diff --git a/modules/by-name/ni/nix-index/command_not_found.sh b/modules/by-name/ni/nix-index/command_not_found.sh index f650cf7b..e3036797 100644 --- a/modules/by-name/ni/nix-index/command_not_found.sh +++ b/modules/by-name/ni/nix-index/command_not_found.sh @@ -31,7 +31,7 @@ command_not_found_handle() { case "$len" in 0) - eprintln "$cmd: command not found" + printf "%s: command not found\n" "$cmd" >&2 ;; 1) # If only one package provides this, then we can invoke it -- cgit 1.4.1