Skip to content

Conversation

@ninmonkey
Copy link

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 )

…ester#225 )

Explicitly set `utf8` to ensure `PesterInterface.ps1` is using utf8 encoding for json filepaths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant