From ef1295fb35c87438d79f303ec9632d01979aee10 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 9 Aug 2024 22:48:14 -0300 Subject: [PATCH] Silence issourcezap-member noise in sourcezap-sh --- libexec/sourcezap/commands/sourcezap-checkout | 2 +- libexec/sourcezap/commands/sourcezap-clone | 2 +- libexec/sourcezap/commands/sourcezap-pull | 2 +- libexec/sourcezap/utils/issourcezap-member | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/sourcezap/commands/sourcezap-checkout b/libexec/sourcezap/commands/sourcezap-checkout index 9427427..ad5352e 100755 --- a/libexec/sourcezap/commands/sourcezap-checkout +++ b/libexec/sourcezap/commands/sourcezap-checkout @@ -21,7 +21,7 @@ if [ "$(id -u)" = "0" ]; then exit 1 fi -if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then +if ! "${libexec}"/utils/issourcezap-member; then printerr "$(id -un) is not a member of _sourcezap" exit 1 fi diff --git a/libexec/sourcezap/commands/sourcezap-clone b/libexec/sourcezap/commands/sourcezap-clone index 0745236..04bf36b 100755 --- a/libexec/sourcezap/commands/sourcezap-clone +++ b/libexec/sourcezap/commands/sourcezap-clone @@ -22,7 +22,7 @@ if [ "$(id -u)" = "0" ]; then exit 1 fi -if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then +if ! "${libexec}"/utils/issourcezap-member; then printerr "$(id -un) is not a member of _sourcezap" exit 1 fi diff --git a/libexec/sourcezap/commands/sourcezap-pull b/libexec/sourcezap/commands/sourcezap-pull index 51c527a..c971dd3 100755 --- a/libexec/sourcezap/commands/sourcezap-pull +++ b/libexec/sourcezap/commands/sourcezap-pull @@ -20,7 +20,7 @@ if [ "$(id -u)" = "0" ]; then exit 1 fi -if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then +if ! "${libexec}"/utils/issourcezap-member; then printerr "$(id -un) is not a member of _sourcezap" exit 1 fi diff --git a/libexec/sourcezap/utils/issourcezap-member b/libexec/sourcezap/utils/issourcezap-member index 65742b1..54069a3 100755 --- a/libexec/sourcezap/utils/issourcezap-member +++ b/libexec/sourcezap/utils/issourcezap-member @@ -5,5 +5,5 @@ set -e # main group="_sourcezap" mygroups=$(id -Gn | tr ' ' '\n') -echo "${mygroups}" | grep -e "^${group}$" +echo "${mygroups}" | grep -e "^${group}$" > /dev/null 2>&1 exit "${?}"