fix(archive): compress/extract hung silently when script (util-linux) is missing - #21
Open
nocstah wants to merge 1 commit into
Open
fix(archive): compress/extract hung silently when script (util-linux) is missing#21nocstah wants to merge 1 commit into
script (util-linux) is missing#21nocstah wants to merge 1 commit into
Conversation
Some distros split the `script` binary out of the core util-linux package (Fedora ships it as `util-linux-script`). _ptyArgs() assumed it was always present; without it the archive process never started, so every compress/ extract silently hung with the transfer queue jammed behind it -- and six selfchecks failed as a cascade. The wrapper now probes with `command -v`: with `script` present, behavior is byte-identical; without it the job runs PTY-less to completion, losing only the live intra-file percentage (isatty-gated in the archivers) while whole-line events still reach onLineRead. Exit codes propagate on both arms. README gains a row documenting the dependency and the Fedora subpackage name. Verified: 146/146 with `script` on PATH, and 146/146 with it masked out of PATH (previously the 6-failure cascade). Fixes Percius04#16 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #16.
Some distros split the
scriptbinary out of the core util-linux package (Fedora ships it asutil-linux-script)._ptyArgs()assumed it was always present; without it the archive process never started, so every compress/extract silently hung with the transfer queue jammed behind it — and six selfchecks failed as a cascade on a stock Fedora install.The wrapper now probes with
command -vinside the same bash invocation:scriptpresent: behavior byte-identical to before (samescript -qec … /dev/null).scriptabsent: the job runs PTY-less to completion and reports success/failure normally — it loses only the live intra-file percentage (isatty-gated in the archivers themselves), while whole-line events (per-file/volume lines) still reachonLineRead.Exit codes propagate on both arms (verified with a forced
exit 3through each). README gains a row in the optional-dependencies table documentingscriptand the Fedora subpackage name.Verification:
--selfcheck: 146/146 withscripton PATH.--selfcheckwithscriptmasked out of PATH (shim dir containing every binary except it): 146/146 — previously that environment produced the 6-failure cascade described in v1.1 archive compress/extract hangs silently whenscript(util-linux) is missing — Fedora splits it intoutil-linux-script#16.🤖 Generated with Claude Code