fix(install): capture tar extraction diagnostic output on darwin-arm64 (PILOT-221)#348
Open
matthew-pilot wants to merge 1 commit into
Open
fix(install): capture tar extraction diagnostic output on darwin-arm64 (PILOT-221)#348matthew-pilot wants to merge 1 commit into
matthew-pilot wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes PILOT-221:
install.shtarball extraction fails silently on darwin-arm64. Thebsdtaron 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
tarandgunzipinto a temp file instead of discarding it — preserves diagnostic output for debugging.EXTRACT_OKflag replaces the chained! ... || ...pattern for cleaner control flow through the two fallback attempts.tar -xzfandgunzip | tar -xfail, the error message now includes tool stderr so the root cause is identifiable.Verification
bash -nanddash -ninstall.shCloses https://vulturelabs.atlassian.net/browse/PILOT-221