From b3720019b2035400053cd84ee284578cec2d1e54 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 9 Aug 2024 22:51:35 -0300 Subject: [PATCH] Call issourcezap-member before ${gitdir} check --- libexec/sourcezap/commands/sourcezap-sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/sourcezap/commands/sourcezap-sh b/libexec/sourcezap/commands/sourcezap-sh index 0f70d6f..efcb607 100755 --- a/libexec/sourcezap/commands/sourcezap-sh +++ b/libexec/sourcezap/commands/sourcezap-sh @@ -20,15 +20,16 @@ if [ "$(id -u)" = "0" ]; then exit 1 fi +if ! "${libexec}"/utils/issourcezap-member; then + printerr "$(id -un) is not a member of _sourcezap" + exit 1 +fi + if [ ! -e "${gitdir}" ]; then printerr "try 'sourcezap clone' instead" exit 1 fi -if ! "${libexec}"/utils/issourcezap-member; then - printerr "$(id -un) is not a member of _sourcezap" -fi - cd "${gitdir}" doas -n \ -u "${user}" \