From 4fe4e308079315588239d7e79b9a4c8e35818505 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 1 Jul 2026 19:52:40 +0000 Subject: [PATCH] Fix deploy_service to expose git clone errors instead of swallowing them Removed &>/dev/null suppression; output is now captured and shown in msg_error with a debug command when clone or pull fails. Co-Authored-By: Claude Sonnet 4.6 --- install-stack.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install-stack.sh b/install-stack.sh index 66a3bd3..e60f61c 100755 --- a/install-stack.sh +++ b/install-stack.sh @@ -480,10 +480,17 @@ deploy_service() { local id=$1 repo_name=$2 local_src=$3 dest=$4 if [[ "$USE_FORGEJO" == "true" ]]; then local url; url=$(build_clone_url "$repo_name") - pct exec "$id" -- bash -c " - if [ -d '${dest}/.git' ]; then cd '${dest}' && git pull -q; \ - else git clone -q '${url}' '${dest}'; fi - " &>/dev/null + local out + out=$(pct exec "$id" -- bash -c " + if [ -d '${dest}/.git' ]; then + cd '${dest}' && git pull 2>&1 + else + git clone '${url}' '${dest}' 2>&1 + fi + " 2>&1) || msg_error "Deploy of ${repo_name} to LXC ${id} failed: +${out} + + Debug: pct enter ${id} && git clone ${url//oauth2:*@/} /tmp/test-clone" else push_dir "$id" "$local_src" "$dest" fi