Closed fflaten closed 1 year ago
Would you mind just adding any of the solutions as you see fit?
Sent from my Mobile Device
Op 26 mrt. 2023 om 19:30 heeft Frode Flaten @.***> het volgende geschreven:
Exception is thrown by Test-Path here Can repro with same string using Test-Path in unix only (pester/docs devcontainer).
$t = @" :::note This page was generated using the comment based help in Pester $($ModuleList.Pester). To edit the content of this page, change the corresponding help in the pester/pester-repository. ::: "@
Test-Path $t Using Test-Path -LiteralPath $t doesn't throw, but maybe better to check if string is a path first? Haven't really identified the issue as you can solve it by any of these ways:
Remove ::: prefix Remove / in the link name Remove square brackets in link (which are wildcard chars, so that makes sense) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
If you have an example of how to check if string is really a path, let me know and I will make a new version.
Was about to suggest Test-Path $t -IsValid
, but it's actually true with :::
prefix which is probably why some provider-code with wildcard-support is executed.
You could maybe just catch the exception like suggested here: https://ss64.com/ps/test-path.html
Awesome, will add that when I find the time 👍 because while we are doing all this, I am also being flooded with this https://github.com/alt3/rank-my-wallet/blob/main/contributing.md#translations
Fix released with https://github.com/alt3/Docusaurus.Powershell/releases/tag/1.0.34. Thanks for the pointer 👍
Exception is thrown by
Test-Path
here Can repro with same string usingTest-Path
in unix only (pester/docs devcontainer).Using
Test-Path -LiteralPath $t
doesn't throw, but maybe better to check if string is a path first? Haven't really identified the issue as you can solve it by any of these ways::::
prefix/
in the link name