~emersion/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

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

Details
Message ID
<20201213200948.31483-1-contact@kchibisov.com>
DKIM signature
pass
Download raw message
Patch: +2 -2
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
Details
Message ID
<8Y3559hRTINIJuYvdsrfCQZ3FnuWHWkSoamuZj5D5d5rqNWT5FZPOE4bQACE4on7Ft3F8tMpZK26KkjPIoLmNOOz6DtCBK5R7loDBAl19w0=@emersion.fr>
In-Reply-To
<20201213200948.31483-1-contact@kchibisov.com> (view parent)
DKIM signature
pass
Download raw message
Sounds good! Can we also update the check for jq, which is further
down below?
Reply to thread Export thread (mbox)