From ad66b0251f3f3938a91a34fd2feaa301b5d047b1 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 1 Jul 2024 09:35:59 +0100 Subject: [PATCH] fix(zsh/helper): make command-path helper return 1 if command does not exist --- zshenv | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zshenv b/zshenv index ff69414..7d85bf5 100644 --- a/zshenv +++ b/zshenv @@ -69,6 +69,10 @@ command-exists() { } command-path() { + if ! command-exists "$1"; then + return 1 + fi + echo "${commands[$1]}" }