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]: https://github.com/github/vscode-codeql/pull/2104
This commit is contained in:
@@ -403,19 +403,17 @@ export class DatabaseUI extends DisposableObject {
|
||||
};
|
||||
|
||||
private handleTourDependencies = async (): Promise<void> => {
|
||||
// find workspace root folder
|
||||
if (!workspace.workspaceFolders?.length) {
|
||||
throw new Error("No workspace folder is open.");
|
||||
} else {
|
||||
// find tutorial queries folder
|
||||
const tutorialQueriesPath = Uri.parse(
|
||||
`${workspace.workspaceFolders?.[0].uri}/tutorial-queries`,
|
||||
const tutorialQueriesPath = join(
|
||||
`${workspace.workspaceFolders[0].uri.fsPath}/tutorial-queries`,
|
||||
);
|
||||
const cli = this.queryServer?.cliServer;
|
||||
if (!cli) {
|
||||
throw new Error("No CLI server found");
|
||||
}
|
||||
await cli.packInstall(tutorialQueriesPath.fsPath);
|
||||
await cli.packInstall(tutorialQueriesPath);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user