Skip to content

fix(install): capture tar extraction diagnostic output on darwin-arm64 (PILOT-221)#348

Open
matthew-pilot wants to merge 1 commit into
mainfrom
openclaw/pilot-221-20260703-142220
Open

fix(install): capture tar extraction diagnostic output on darwin-arm64 (PILOT-221)#348
matthew-pilot wants to merge 1 commit into
mainfrom
openclaw/pilot-221-20260703-142220

Conversation

@matthew-pilot

Copy link
Copy Markdown
Collaborator

What

Fixes PILOT-221: install.sh tarball extraction fails silently on darwin-arm64. The bsdtar on macOS can produce no output when extracting GitHub gzip archives on arm64 without reporting an error. The existing code redirected stderr to /dev/null, leaving no diagnostic trail.

Changes

  1. Capture stderr from tar and gunzip into a temp file instead of discarding it — preserves diagnostic output for debugging.
  2. Explicit EXTRACT_OK flag replaces the chained ! ... || ... pattern for cleaner control flow through the two fallback attempts.
  3. Show diagnostics on total failure — if both tar -xzf and gunzip | tar -x fail, the error message now includes tool stderr so the root cause is identifiable.

Verification

  • Shell syntax validated with bash -n and dash -n
  • No Go changes — shell-only fix in install.sh
  • Logic covers: success → pass, silent fail → fallback, both fail → diagnostics + exit 1

Closes https://vulturelabs.atlassian.net/browse/PILOT-221

…4 (PILOT-221)

macOS bsdtar can silently produce no output when extracting GitHub
gzip archives on arm64 (darwin-arm64). The existing code suppressed
stderr via 2>/dev/null, leaving users with a generic "failed to
extract" error and no diagnostic path to debug or report the failure.

This change:
- Captures stderr from tar and gunzip into a temp file instead of
  /dev/null, so diagnostic output is available when extraction fails.
- Uses an explicit EXTRACT_OK flag for cleaner fallback control flow.
- Shows diagnostic output (tool stderr) when both extraction methods
  fail, making it possible to identify the root cause.
- Cleans up the temp file on success.

The gunzip|tar fallback is preserved as the second attempt path.

Closes PILOT-221
@matthew-pilot matthew-pilot requested a review from TeoSlayer as a code owner July 3, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant