~emersion/public-inbox

mako: makoctl: properly silence checking with 'type' v2 APPLIED

Kirill Chibisov: 1
 makoctl: properly silence checking with 'type'

 1 files changed, 3 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/public-inbox/patches/15961/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH mako v2] makoctl: properly silence checking with 'type' Export this patch

Initially only stdout was redirected to silence case when 'type'
succeeds. However when 'type' fails to find something, it logs
that to stderr, however makoctl does proper error reporting when
something is missing anyway, thus 'type' stderr could be
suppressed.
---
 makoctl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/makoctl b/makoctl
index 5b9d01a..dd0aa16 100755
--- a/makoctl
+++ b/makoctl
@@ -26,10 +26,10 @@ usage() {
}

BUSCTL=busctl
if ! type $BUSCTL > /dev/null; then
if ! type $BUSCTL > /dev/null 2>&1; then
	BUSCTL=basuctl
fi
if ! type $BUSCTL > /dev/null; then
if ! type $BUSCTL > /dev/null 2>&1; then
	echo >&2 "$0: busctl or basuctl is required"
	exit 1
fi
@@ -98,7 +98,7 @@ case "$1" in
	;;
"menu")
	shift 1
	if ! type jq > /dev/null; then
	if ! type jq > /dev/null 2>&1; then
		echo >&2 "$0: jq is required to use 'menu'"
		exit 1
	fi
-- 
2.26.2
Pushed, thanks!