Prerequisites
Steps to reproduce
Start cmd in path A, switch cmd to path B, run pwsh, then switch pwsh back to path A. At this point, the directory pointed to by path B cannot be deleted.
Expected behavior
PowerShell should not lock the startup directory, or at least unlock the original directory after changing to another path with cd.
Actual behavior
The startup directory cannot be deleted.
Environment data
Name Value
---- -----
PSVersion 7.6.1
PSEdition Core
GitCommitId 7.6.1
OS Microsoft Windows 10.0.26300
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
Start cmd in path A, switch cmd to path B, run pwsh, then switch pwsh back to path A. At this point, the directory pointed to by path B cannot be deleted.
Expected behavior
PowerShell should not lock the startup directory, or at least unlock the original directory after changing to another path with cd.
Actual behavior
The startup directory cannot be deleted.
Environment data