Skip to content

Fix trace command on Windows project drives#54

Open
emulatronicGIT wants to merge 1 commit into
tsperf:mainfrom
emulatronicGIT:fix-windows-trace-command-cwd
Open

Fix trace command on Windows project drives#54
emulatronicGIT wants to merge 1 commit into
tsperf:mainfrom
emulatronicGIT:fix-windows-trace-command-cwd

Conversation

@emulatronicGIT
Copy link
Copy Markdown

No description provided.

@emulatronicGIT emulatronicGIT requested a review from danielroe as a code owner May 13, 2026 01:31
@emulatronicGIT
Copy link
Copy Markdown
Author

Fixes #48.

What changed

  • Build the trace command without wrapping it in a shell-level cd ...; ... command.
  • Keep using the selected project directory as the child process cwd.
  • Add a small shell helper for trace directory substitution and platform-specific quoting.
  • Add Vitest coverage for the Windows cross-drive trace command case.

Why

On Windows, the previous command could generate a trace invocation like:

(cd 'p:\\project'; npx tsc --noEmit --generateTrace 'c:\\Users\\...\\traces')

That fails when the shell starts from a different drive. The process already receives the intended project path as cwd, so the explicit shell cd is unnecessary and makes the command less portable.

Validation

  • corepack pnpm exec vitest run
  • corepack pnpm run typecheck
  • corepack pnpm exec eslint src/commands.ts src/shell.ts test/shell.test.ts

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