Skip to content

Fix: tsc -w is losing working directory in macOS Terminal #59315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

Dremora
Copy link

@Dremora Dremora commented Jul 17, 2024

Fixes #57894.

See this comment for the detailed explanation of the fix.

The escape sequences are taken from Jest that doesn't have the same issue.

@@ -1604,7 +1604,11 @@ export let sys: System = (() => {
setTimeout,
clearTimeout,
clearScreen: () => {
process.stdout.write("\x1Bc");
process.stdout.write(
platform === "win32"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like #57701 this will be a behavior change; we'll have to check to see how it behaves and make sure we're okay with the change.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I posted a big list of tests on #57701 (comment); I believe that other PR to be better (but both fix your issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tsc --watch changes shell's current directory to ~ in Terminal.app while running
3 participants