Skip to content

fix(archive): compress/extract hung silently when script (util-linux) is missing - #21

Open
nocstah wants to merge 1 commit into
Percius04:masterfrom
nocstah:fix/script-pty-fallback
Open

fix(archive): compress/extract hung silently when script (util-linux) is missing#21
nocstah wants to merge 1 commit into
Percius04:masterfrom
nocstah:fix/script-pty-fallback

Conversation

@nocstah

@nocstah nocstah commented Aug 21, 2026

Copy link
Copy Markdown

Fixes #16.

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 on a stock Fedora install.

The wrapper now probes with command -v inside the same bash invocation:

  • script present: behavior byte-identical to before (same script -qec … /dev/null).
  • script absent: 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 reach onLineRead.

Exit codes propagate on both arms (verified with a forced exit 3 through each). README gains a row in the optional-dependencies table documenting script and the Fedora subpackage name.

Verification:

🤖 Generated with Claude Code

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>
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.

v1.1 archive compress/extract hangs silently when script (util-linux) is missing — Fedora splits it into util-linux-script

1 participant