Skip to content

Commit ad38363

Browse files
Fix test location URI construction on Linux/Mac (#2129)
Use vscode.Uri.file instead of vscode.Uri.parse with hard-coded 'file:///' prefix. On Linux/Mac, file paths start with '/' so combining 'file:///' + '/home/user/...' produces 'file:////home/...' (four slashes) which is an invalid URI. vscode.Uri.file correctly handles platform differences, matching the existing pattern used throughout SolutionExplorer.fs. Closes #2117 Co-authored-by: Repo Assist (Copilot) <223556219+Copilot@users.noreply.github.com>
1 parent a94d274 commit ad38363

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Components/TestExplorer.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ module TestItem =
933933
if String.IsNullOrEmpty path then
934934
None
935935
else
936-
vscode.Uri.parse ($"file:///{path}", true) |> Some
936+
vscode.Uri.file path |> Some
937937
with e ->
938938
logger.Debug($"Failed to parse test location uri {path}", e)
939939
None

0 commit comments

Comments
 (0)