Skip to content

Fix Windows shell shutdown and path handling - #1

Merged
d0lb33 merged 3 commits into
mainfrom
codex/fix-windows-shell-shutdown
Aug 4, 2026
Merged

Fix Windows shell shutdown and path handling#1
d0lb33 merged 3 commits into
mainfrom
codex/fix-windows-shell-shutdown

Conversation

@d0lb33

@d0lb33 d0lb33 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep the real WorkTrellis CLI supervisor in the foreground under Git Bash
  • isolate Windows application wrappers from console-wide Ctrl+C delivery
  • quote Portless command tokens safely when paths contain spaces or cmd metacharacters
  • recover lost-state listener PIDs through PowerShell with native executable fallbacks
  • add Windows-focused regressions, a cross-platform CLI smoke check, and the 0.4.3 release notes

Root cause

The npm launcher used a relay process, so Git Bash could return to the prompt while the actual WorkTrellis shutdown was still running. At the same time, Portless 0.15.x joins command arguments into an unquoted cmd.exe string and exits immediately from its signal handler, which could both truncate C:\\Program Files\\... paths and leave the underlying Next.js tree alive.

Impact

One Ctrl+C now remains owned by the foreground WorkTrellis supervisor, and Windows process-tree cleanup can discover and reap a listener even when persisted run state is missing. Standard Node installations under C:\\Program Files also launch correctly through Portless.

Validation

  • pnpm install --frozen-lockfile
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • node bin/worktrellis.mjs --version
  • node bin/worktrellis.mjs self-check
  • npm pack --dry-run
  • git diff --check

@d0lb33
d0lb33 marked this pull request as ready for review August 4, 2026 17:01
@d0lb33
d0lb33 merged commit 664b40f into main Aug 4, 2026
12 of 13 checks passed
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.

1 participant