spawn locks cwd on Windows

Open
#647 0 comments 0 reactions 1 assignee View on GitHub

@deepak1556 is already working on this.

Since Dec 19, 2025.

Assessment

This issue has not been assessed yet.

Description

bug windows

Environment details

  • OS: Windows 10
  • OS version: 19045
  • node-pty version: current main branch d6ce76a801f68730f7204b7b27bb21dbf8e63001

Issue description

Calling spawn locks cwd directory so that you can't rename/delete that folder

Some times I would right click a folder and click "open in integrated terminal" in vscode and leave it, and then some time after when I try to rename/delete that folder, it will tell me that folder is locked (it doesn't tell you what's locking it, and since I don't know terminal/shell would do that, I did end up closing every app)

Windows Terminal fixed this by always spawning the shell process (or change it to later on) on C:\windows\system32: https://github.com/microsoft/terminal/issues/5506#issuecomment-1531673086

Dominant language
TypeScript
Stars
2k
Forks
337
Avg merge
21h 58m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/node-pty

All issues in microsoft/node-pty

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.