From 5daecc9381e2a7d881b0d220e2aa774f4d31a7ab Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Thu, 25 Jun 2020 01:36:12 +0300 Subject: [PATCH] lib: Log in case _command_exists fails --- lib/helpers.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers.bash b/lib/helpers.bash index 2d05c919..2459e02b 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -21,7 +21,7 @@ function _command_exists () _param '1: command to check' _example '$ _command_exists ls && echo exists' _group 'lib' - type "$1" &> /dev/null ; + type "$1" &> /dev/null || (_log_warning "Command $1 does not exist!" && return 1) ; } function _make_reload_alias() {