Skip to content

Commit 28abc1e

Browse files
committed
Don't reparse Uri path
I was initially trying to understand why this method was failing due to an unrelated error [1] so I ended up over-engineering the path parsing. We can use the path from the first workspace folder, like we do in other places in the extension. [1]: #2104
1 parent 9b7c3bc commit 28abc1e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

extensions/ql-vscode/src/local-databases-ui.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,19 +403,17 @@ export class DatabaseUI extends DisposableObject {
403403
};
404404

405405
private handleTourDependencies = async (): Promise<void> => {
406-
// find workspace root folder
407406
if (!workspace.workspaceFolders?.length) {
408407
throw new Error("No workspace folder is open.");
409408
} else {
410-
// find tutorial queries folder
411-
const tutorialQueriesPath = Uri.parse(
412-
`${workspace.workspaceFolders?.[0].uri}/tutorial-queries`,
409+
const tutorialQueriesPath = join(
410+
`${workspace.workspaceFolders[0].uri.fsPath}/tutorial-queries`,
413411
);
414412
const cli = this.queryServer?.cliServer;
415413
if (!cli) {
416414
throw new Error("No CLI server found");
417415
}
418-
await cli.packInstall(tutorialQueriesPath.fsPath);
416+
await cli.packInstall(tutorialQueriesPath);
419417
}
420418
};
421419

0 commit comments

Comments
 (0)