From: Paul Hänsch Date: Fri, 1 Dec 2023 14:47:44 +0000 (+0100) Subject: prevent stdout output from git setup X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=c1e4c01a3de1e06a203897d165b4898485447781;p=invoices prevent stdout output from git setup --- diff --git a/index.cgi b/index.cgi index dcfe98a..4794146 100755 --- a/index.cgi +++ b/index.cgi @@ -17,14 +17,14 @@ SESSION_COOKIE _() { printf '%s\n' "$*"; } . "$_EXEC/l10n.sh" -which git && [ ! -d .git ] && { +if which git >/dev/null && [ ! -d .git ]; then git -C "$_DATA" init mkdir -p "$_DATA/documents/" "$_DATA/export/" printf 'export/ serverkey' >"$_DATA/.gitignore" git -C "$_DATA" add documents/ .gitignore git -C "$_DATA" commit -m 'initialisation of document repo' -} >&2 +fi >&2 [ "$REQUEST_METHOD" = POST ] && case $(POST action) in new_invoice)