vscode-adapter icon indicating copy to clipboard operation
vscode-adapter copied to clipboard

fix encoding errors when paths contain non-ascii characters #225

Open ninmonkey opened this issue 3 months ago • 0 comments

The error was writing json filepaths like foo.🐒 as foo.≡ƒÉÆ causing the missing path errors.

Making this explicit means PesterInterface.ps1 will write json paths using utf8 even when ran from pwsh -NoProfile

$Paths = @{
    PestInterface       = Join-Path $Env:UserProfile '.vscode\extensions\pspester.pester-test-2023.7.8\Scripts\PesterInterface.ps1'
    ToDiscover          = 'g:\temp\2025-11\example.🐒\example.tests.ps1'
}

& $Paths.PestInterface -Discovery $Paths.ToDiscover

To reproduce the error

You should start a new terminal. Running pwsh -Nop alone is not sufficient. ( ie: it doesn't always reproduce after encoding is set once )

ninmonkey avatar Nov 30 '25 06:11 ninmonkey