fix(plugins): keep the standup sweep output when a CLI call prints nothing
What & why
Fixes #9196.
The headline bug in #9196 (HOST_ARGS[@]: unbound variable on macOS bash 3.2) is already fixed on main. #9257 set HOST_ARGS=(--local) as the default, so the array is never empty. I ran the current script under /bin/bash 3.2.57 and terminals come back correctly.
This PR fixes the related problem the triage found in the same loop:
run_jsontreated empty stdout as valid, becausejq -c . <empty>exits 0 and prints nothing. The emptyREADthen failed--argjson read "". That emptiedTERMINALS, and the finaljqfailed, so the sweep printed no JSON at all.run_jsonnow returnsnull(and logsno output from: …) when stdout is empty.- The loop skips a terminal whose
ENTRYis empty instead of passing""to--argjson. - The
supersetplugin goes to 0.3.5 in bothplugin.jsonfiles, the same way #9257 bumped it to 0.3.4.
How I tested it
I put a stub superset on PATH and ran sweep.sh with macOS /bin/bash 3.2.57:
- No
--host, normal output: workspaces, tasks, and terminals (withtext) are all present, before and after this change. terminals readprints nothing: before,jq: invalid JSON text passed to --argjsonand no JSON on stdout. After, full JSON with"text": nullfor that terminal.bun run check:pluginspasses.biome check plugins/supersetis clean.
There are no TS changes, so I didn't run typecheck/test.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (only shell/JSON changed; biome clean on the touched files) - "Allow edits from maintainers" is checked on fork PRs
- I have signed the CLA (the bot asks on your first PR)
Summary by cubic
Fixes the standup sweep so it still outputs JSON when a CLI call prints nothing.
When superset terminals read produced empty stdout, run_json treated it as valid output, the empty value failed --argjson, and the sweep ended up printing no JSON at all. run_json now returns null and logs no output from: ... when stdout is empty, and the loop skips a terminal with no entry instead of passing "" to --argjson.
Also bumps the superset plugin to 0.3.5 in both plugin.json files.
Summary by CodeRabbit
- Bug Fixes
- Improved handling of successful commands that return no output, preventing invalid results from being treated as valid JSON.
- Skipped empty terminal entries to avoid displaying or processing blank items.
- Chores
- Updated the Superset plugin version to 0.3.5 in both plugin manifests.