You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework install.sh so `curl | bash` failures produce actionable output,
re-runs give meaningful per-item feedback, and non-bash invocations
fail fast with guidance.
- Surface real `claude` CLI errors by capturing stderr to per-run
tempfiles under `${TMPDIR:-/tmp}/closedloop-install.XXXXXX` (cleaned
via an EXIT trap) and displaying them through a BSD- and GNU-sed
portable `sanitize_stderr` helper (literal ESC via ANSI-C quoting
plus POSIX `tr` octal ranges).
- Make the marketplace registration idempotent via
`claude plugin marketplace list --json` — re-runs print
"Marketplace already registered: closedloop-ai" instead of
re-invoking `marketplace add`.
- Classify each plugin per run by diffing pre/post snapshots from
`claude plugin list --json`, printing exactly one of `Installed:`,
`Updated: <plugin> (<old> -> <new>)`, or `Already up to date:`, and
rendering a three-count summary that preserves the failed count.
- Add a POSIX-portable `BASH_VERSION` guard at the very top of the
script so `dash install.sh` (and similar) exit cleanly with a
single-line guidance message before any bash-only syntax runs.
- Promote `jq` from a soft warn-and-continue to a hard preflight
requirement with brew/apt install instructions, since the snapshot
and idempotency logic depend on it.
Verified on macOS (bash 3.2, BSD sed): fresh install, idempotent
re-run, bogus marketplace source, invalid plugin ref, synthesized
`Updated` version delta, `dash install.sh`, and `jq` hidden from
PATH all produce the expected output and exit codes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments