Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ runs:
# Fetch the deployed services as JSON. Compose files, stack, provider,
# and project come from the environment set earlier, so they don't
# need to be passed again.
# Only fall back to an empty array on failure, so a successful run
# never yields two concatenated JSON values.
if services=$(defang services --json 2>/dev/null); then
# Fall back to an empty array whenever the command fails OR its
# output isn't valid JSON (e.g. a stray CLI banner/warning line) —
# this step is best-effort reporting and must never fail the job
# over a deployment that already succeeded.
if services=$(defang services --json 2>/dev/null) && echo "$services" | jq empty 2>/dev/null; then
:
else
services='[]'
Expand Down
Loading