github yvgude/lean-ctx v2.21.6

latest releases: v3.9.12, v3.9.11, v3.9.10...
3 months ago

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_lc now checks not isatty stdout before routing through lean-ctx.
  • Pipe guard for PowerShell_lc now checks [Console]::IsOutputRedirected before 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-ctx

Full Changelog: v2.21.6...v2.21.6

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.