v2.21.6
Shell Hook Pipe Guard — Fix curl | sh Broken by lean-ctx
Fixed — Piped commands corrupted by lean-ctx compression
- Pipe guard for Bash/Zsh —
_lc()now checks[ ! -t 1 ](stdout is not a terminal) before routing through lean-ctx. When piped (e.g.curl -fsSL https://example.com/install.sh | sh), commands run directly without compression. Previously, lean-ctx would buffer and compress the output, corrupting install scripts and other piped data. - Pipe guard for Fish —
_lcnow checksnot isatty stdoutbefore routing through lean-ctx. - Pipe guard for PowerShell —
_lcnow checks[Console]::IsOutputRedirectedbefore routing through lean-ctx.
Important
After updating, run lean-ctx init to regenerate the shell hooks with the pipe guard. Or open a new terminal tab.
Testing
- 5 new E2E tests for pipe-guard behavior and piped output preservation.
- 3 new unit tests verifying pipe-guard presence in all shell hook variants (Bash, Fish, PowerShell).
- All 677 tests passing, zero clippy warnings.
Upgrade
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxFull Changelog: v2.21.6...v2.21.6