Skip to content

$psEditor.Workspace.OpenFile puts file name into all lower case.  #2960

Closed
@jhoneill

Description

@jhoneill

System Details Output


### VSCode version: 1.49.0 e790b931385d72cf5669fcefc51cdf65990efa5d x64

### VSCode extensions:      
andyyaldoo.vscode-json@1.5.0
jock.svg@1.3.9
ms-azure-devops.azure-pipelines@1.174.2
ms-azuretools.vscode-azurefunctions@0.24.0
ms-dotnettools.csharp@1.23.2
ms-mssql.mssql@1.9.0
ms-python.python@2020.8.108011
ms-vscode-remote.remote-containers@0.140.1
ms-vscode-remote.remote-ssh@0.51.0
ms-vscode-remote.remote-ssh-edit@0.51.0
ms-vscode-remote.remote-wsl@0.44.5
ms-vscode-remote.vscode-remote-extensionpack@0.20.0
ms-vscode.azure-account@0.9.3
ms-vscode.powershell@2020.6.0
ms-vscode.powershell-preview@2020.7.0


### PSES version: 2.3.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

This also appears with vs-code insiders and the 2020.9.0 extension ...

The issue is that the $psEditor.Workspace.OpenFile - which is called from various places - like PsEdit, changes the file name to lower case. This is usually just a cosmetic problem, but I have found a case were pester ran a script using its lower-cased name and the script failed because it tried to do a case sensitive replace on part of its own name.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions