fix(utils): Prevent RangeError from large command output #433
GitHub Actions / warden: code-simplifier
completed
May 29, 2026 in 2m 51s
2 issues
code-simplifier: Found 2 issues (2 low)
Low
Redundant `1 *` prefix makes 1 MiB constant less readable - `src/utils/command.ts:128`
Replace 1 * 1024 * 1024 with 1024 * 1024 — multiplying by 1 is a no-op that adds visual noise and is inconsistent with the 64 * 1024 * 1024 pattern used for the same unit on line 77.
Duplicated stdout/stderr chunk handler logic should be consolidated - `src/utils/command.ts:287-330`
The two attachStream callbacks (lines 287–330) are structurally identical — extract a shared helper (e.g. makeChunkHandler) to eliminate the duplication.
⏱ 2m 36s · 111.4k in / 9.7k out · $0.44
Loading