Directory changed to "C:\Users\user\[TEST] Directory"
❯ cd "C:\Users\user\[TEST] Directory"
Set-Location: Cannot find path 'C:\Users\user\[TEST] Directory' because it does not exist.
❯ Get-Error
Exception :
Type : System.Management.Automation.ItemNotFoundException
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : Cannot find path 'C:\Users\user\[TEST] Directory' because it does not exist.
HResult : -2146233087
TargetObject : C:\Users\user\[TEST] Directory
CategoryInfo : ObjectNotFound: (C:\Users\user\[TEST] Directory:String) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : PathNotFound
ItemName : C:\Users\user\[TEST] Directory
SessionStateCategory : Drive
TargetSite :
Name : SetLocation
DeclaringType : System.Management.Automation.SessionStateInternal, System.Management.Automation, Version=7.4.0.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
MemberType : Method
Module : System.Management.Automation.dll
Message : Cannot find path 'C:\Users\user\[TEST] Directory' because it does not exist.
Source : System.Management.Automation
HResult : -2146233087
StackTrace :
at System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context, Boolean literalPath)
at Microsoft.PowerShell.Commands.SetLocationCommand.ProcessRecord()
TargetObject : C:\Users\user\[TEST] Directory
CategoryInfo : ObjectNotFound: (C:\Users\user\[TEST] Directory:String) [Set-Location], ItemNotFoundException
FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
InvocationInfo :
MyCommand : Set-Location
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 10
Line : cd 'C:\Users\user\[TEST] Directory'
Statement : cd 'C:\Users\user\[TEST] Directory'
PositionMessage : At line:1 char:1
+ cd 'C:\Users\user\[TEST] Directory'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : cd
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
❯ echo $PSVersionTable
Name Value
---- -----
PSVersion 7.4.0
PSEdition Core
GitCommitId 7.4.0
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
mkdir "$HOME\[TEST] Directory"cd "C:\Users\user\[TEST] Directory"Expected behavior
Directory changed to "C:\Users\user\[TEST] Directory"Actual behavior
Error details
Environment data
Visuals