From c49933cf7094efc2fae7944dd150a7a9861acd1c Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 20 Apr 2026 21:26:27 -0500 Subject: [PATCH] Fix Zapstore publish workflow flag handling Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- .github/workflows/zapstore-publish.yml | 27 +++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/zapstore-publish.yml b/.github/workflows/zapstore-publish.yml index ed543cf0..be26c569 100644 --- a/.github/workflows/zapstore-publish.yml +++ b/.github/workflows/zapstore-publish.yml @@ -49,8 +49,25 @@ jobs: exit 1 fi - zsp publish \ - -y \ - --skip-preview \ - --commit "$COMMIT_SHA" \ - zapstore.yaml + set +e + output="$( + zsp publish \ + --quiet \ + --commit "$COMMIT_SHA" \ + zapstore.yaml 2>&1 + )" + status=$? + set -e + + if [ -n "$output" ]; then + printf '%s\n' "$output" + fi + + if [ "$status" -ne 0 ]; then + exit "$status" + fi + + if [[ "$output" == *"flag provided but not defined"* || "$output" == *"Usage of publish:"* ]]; then + echo "zsp returned success but printed CLI usage, treating this as a failure." >&2 + exit 1 + fi