From 77a3ae1ed61958b0b170ae1056441603869aceff Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 18 Dec 2023 22:17:29 +0100 Subject: [PATCH] fix: handle git fetch/pull failure - continue if `git fetch` or `git pull` fails --- dc-ops | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dc-ops b/dc-ops index e2e0f24..21f26ad 100755 --- a/dc-ops +++ b/dc-ops @@ -32,13 +32,13 @@ for LINE in $STACKLIST; do cd "$STACKDIR" || continue # fetch from repo and check for new commits - git fetch --quiet + git fetch --quiet || continue if [[ $(git rev-parse HEAD) == $(git rev-parse "@{u}") ]]; then msg "no changes - skipping" continue fi # pull new commits and run docker compose - git pull + git pull || continue docker compose --file "${COMPOSEFILE:=docker-compose.yml}" up --build --detach --remove-orphans done