From a17a7b0f7e734f55f918502443e82316128ab67e Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 20 Jul 2023 12:42:58 +0400 Subject: [PATCH] Correctly throwing error on unsatisfied dependency --- build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 9b16afe..6d08f71 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,11 @@ WORKDIR=$(pwd) # --- dep () { - which "$1" || (echo "$1 not found" && exit 1) + if ! which "$1" 2>/dev/null + then + echo "$1 not found" + exit 1 + fi } clone () {