From 265fbb05ed2592e65d964e20d5b3fb5225c9bb10 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Mon, 20 Jul 2026 16:49:42 +0100 Subject: [PATCH] Improve resolver error clarity and trap cleanup ordering Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .github/workflows/appimage10.yml | 7 +++++-- .github/workflows/appimage7.yml | 7 +++++-- .github/workflows/appimage8.yml | 7 +++++-- .github/workflows/appimage9.yml | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/appimage10.yml b/.github/workflows/appimage10.yml index f2fc1f77..9442f045 100644 --- a/.github/workflows/appimage10.yml +++ b/.github/workflows/appimage10.yml @@ -123,7 +123,10 @@ jobs: echo "Using workflow_dispatch TCL ref: $tcl_ref" else tcl_ref=$(retry_ls_remote "refs/tags/${TCL_TAG_GLOB}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -1) - test -n "$tcl_ref" + if [ -z "$tcl_ref" ]; then + echo "No matching Tcl tags found for pattern ${TCL_TAG_GLOB}" >&2 + exit 1 + fi echo "Auto-resolved latest Tcl ref: $tcl_ref" fi @@ -162,8 +165,8 @@ jobs: fi tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD) tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci) - trap - EXIT cleanup_tcl_tmpdir + trap - EXIT else tcl_commit="" tcl_commit_date="" diff --git a/.github/workflows/appimage7.yml b/.github/workflows/appimage7.yml index d2030fc0..480ff28f 100644 --- a/.github/workflows/appimage7.yml +++ b/.github/workflows/appimage7.yml @@ -123,7 +123,10 @@ jobs: echo "Using workflow_dispatch TCL ref: $tcl_ref" else tcl_ref=$(retry_ls_remote "refs/tags/${TCL_TAG_GLOB}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -1) - test -n "$tcl_ref" + if [ -z "$tcl_ref" ]; then + echo "No matching Tcl tags found for pattern ${TCL_TAG_GLOB}" >&2 + exit 1 + fi echo "Auto-resolved latest Tcl ref: $tcl_ref" fi @@ -162,8 +165,8 @@ jobs: fi tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD) tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci) - trap - EXIT cleanup_tcl_tmpdir + trap - EXIT else tcl_commit="" tcl_commit_date="" diff --git a/.github/workflows/appimage8.yml b/.github/workflows/appimage8.yml index c7bd05cb..17920fd6 100644 --- a/.github/workflows/appimage8.yml +++ b/.github/workflows/appimage8.yml @@ -123,7 +123,10 @@ jobs: echo "Using workflow_dispatch TCL ref: $tcl_ref" else tcl_ref=$(retry_ls_remote "refs/tags/${TCL_TAG_GLOB}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -1) - test -n "$tcl_ref" + if [ -z "$tcl_ref" ]; then + echo "No matching Tcl tags found for pattern ${TCL_TAG_GLOB}" >&2 + exit 1 + fi echo "Auto-resolved latest Tcl ref: $tcl_ref" fi @@ -162,8 +165,8 @@ jobs: fi tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD) tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci) - trap - EXIT cleanup_tcl_tmpdir + trap - EXIT else tcl_commit="" tcl_commit_date="" diff --git a/.github/workflows/appimage9.yml b/.github/workflows/appimage9.yml index 73ac5daa..62d190c5 100644 --- a/.github/workflows/appimage9.yml +++ b/.github/workflows/appimage9.yml @@ -123,7 +123,10 @@ jobs: echo "Using workflow_dispatch TCL ref: $tcl_ref" else tcl_ref=$(retry_ls_remote "refs/tags/${TCL_TAG_GLOB}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -1) - test -n "$tcl_ref" + if [ -z "$tcl_ref" ]; then + echo "No matching Tcl tags found for pattern ${TCL_TAG_GLOB}" >&2 + exit 1 + fi echo "Auto-resolved latest Tcl ref: $tcl_ref" fi @@ -162,8 +165,8 @@ jobs: fi tcl_commit=$(git -C "$tcl_tmpdir" rev-parse HEAD) tcl_commit_date=$(git -C "$tcl_tmpdir" log -1 --format=%ci) - trap - EXIT cleanup_tcl_tmpdir + trap - EXIT else tcl_commit="" tcl_commit_date=""