src/goMain.ts: use uri.fsPath for workspace folder path
Uri.path is the path part of the URI. What we need is the file
system path, which is Uri.fsPath.
This fixes `go.locate.tools` that failed on Windows while
trying to run `go env` in each workspace folder.
Change-Id: I109e57269cdfb63488d8d44e294e4d8ae7960578
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245042
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/src/goMain.ts b/src/goMain.ts
index 249984e..d4292be 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -689,7 +689,7 @@
});
let folders = vscode.workspace.workspaceFolders?.map((folder) => {
- return { name: folder.name, path: folder.uri.path };
+ return { name: folder.name, path: folder.uri.fsPath };
});
if (!folders) {
folders = [{ name: 'no folder', path: undefined }];