~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 mako v2] makoctl: properly silence checking with 'type'

Details
Message ID
<20201213203745.2451-1-contact@kchibisov.com>
DKIM signature
pass
Download raw message
Patch: +3 -3
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
Details
Message ID
<QmH7nnIrUGQA3dGuoJwxvqj1fZwsxRv-ZvNvcECrQQmjf1nfOlP9Yvi5MimmZHSQCT6_i436mEWHkTZrXAeN6ZsxUUs_Mu0TdUPuTJv0ny4=@emersion.fr>
In-Reply-To
<20201213203745.2451-1-contact@kchibisov.com> (view parent)
DKIM signature
pass
Download raw message
Pushed, thanks!
Reply to thread Export thread (mbox)