When I use Set-Location
(aka cd
) to change the current directory in a PowerShell window, but deliberately avoid auto-complete and type the name in the "wrong" case...
PS C:\> Set-Location winDOWs
...then Get-Location
(aka pwd
) will return that "wrong" path name:
PS C:\winDOWs> Get-Location
Path
----
C:\winDOWs
This causes problems with svn info
:
PS C:\svn\myDir> svn info --show-item last-changed-revision
2168
PS C:\svn\myDir> cd ..\MYDIR
PS C:\svn\MYDIR> svn info --show-item last-changed-revision
svn: warning: W155010: The node 'C:\svn\MYDIR' was not found.
svn: E200009: Could not display info for all targets because some targets don't exist
As you can see svn info
fails when the user doesn't type the name of the working copy directory "myDir" with the correct letter case when cd
'ing into it.
Is there a way to solve this? I could not find a suitable parameter of svn info
.
Another option could be to overwrite PowerShell's cd
alias and make sure the letter case of the typed path is fixed before actually cd
'ing, but how to accomplish that? Resolve-Path
, for example also returns the "wrong" directory name.