~emersion/public-inbox

makoctl: properly silence checking for {bus,basu}ctl v1 SUPERSEDED

Kirill Chibisov: 1
 makoctl: properly silence checking for {bus,basu}ctl

 1 files changed, 2 insertions(+), 2 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/15960/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] makoctl: properly silence checking for {bus,basu}ctl Export this patch

Redirect stderr for 'type' when checking for busctl or basuctl
existence. Initially only stdout was redirected to silence case when
'type' succeeds. However when 'type' fails to find something, it logs
that to stderr, this logging isn't required, since failures here are
expected and if both binaries are missing it'll be properly logged later
on.
---
 makoctl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/makoctl b/makoctl
index 5b9d01a..c757991 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
-- 
2.26.2
Sounds good! Can we also update the check for jq, which is further
down below?