Skip to content

Fix WSL shell startup by preserving LF in Windows packages - #1253

Merged
nedtwigg merged 1 commit into
mainfrom
fix-wsl-shell-line-endings
Oct 20, 2026
Merged

nedtwigg merged 1 commit into
mainfrom
fix-wsl-shell-line-endings

Conversation

@nedtwigg

Copy link
Copy Markdown
Member

Windows checkouts with core.autocrlf=true can package the Bash integration script with CRLF endings. When Dormouse opens a WSL terminal, Bash fails on do\r before loading the user's profile, leaving tools such as codex and wt off PATH.

Pin the Bash and zsh integration scripts to LF in .gitattributes, covering both desktop and VS Code packages. Add a regression test that performs a Windows-style Git checkout, checks the shipped Unix scripts, and starts Bash from the checked-out integration script to verify profile loading and hook installation. Document the packaging requirement and its rationale.

Validation:

  • Regression test fails before the LF rules and passes afterward.
  • Shell integration, checkout regression, and PTY tests: 136 passed. zsh runtime tests were unavailable locally; zsh checkout bytes are covered.
  • pnpm lint:specs, Markdown formatting check, and git diff --check passed.
  • Repaired the locally installed script and verified a fresh Bash startup finds Codex, Worktrunk, Node, and pnpm.
  • pnpm lint:md encounters two existing Markdown merge-test failures, also reproduced on unchanged main.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: ca0a28e
Status: ✅  Deploy successful!
Preview URL: https://26944efa.mouseterm.pages.dev
Branch Preview URL: https://fix-wsl-shell-line-endings.mouseterm.pages.dev

View logs

@nedtwigg
nedtwigg merged commit d52fdaa into main Oct 20, 2026
14 checks passed
@nedtwigg
nedtwigg deleted the fix-wsl-shell-line-endings branch October 21, 2026 00:01

This branch is waiting to be deployed

1 waiting deployment
hosted-preview — ca0a28e5 Waiting Oct 20, 2026 by nedtwigg via cleanup #1704
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.

2 participants