Skip to content

Commit

Permalink
extension: Update rootPath detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Lysxia committed Dec 12, 2024
1 parent 1f9d2fb commit 6c2010c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ async function createTests(client: LanguageClient) {
client.onNotification("creusot/testitems", addTestItems);

async function runHandler(request: vscode.TestRunRequest, cancellation: vscode.CancellationToken) {
const rootPath = vscode.workspace.rootPath;
if (rootPath === undefined) {
if (vscode.workspace.workspaceFolders === undefined) {
vscode.window.showErrorMessage("Could not run tests: no root path found");
return;
}
const rootPath = vscode.workspace.workspaceFolders[0].uri.fsPath;
const run = controller.createTestRun(request, "Prove");
let requests: readonly vscode.TestItem[];
if (request.include) {
Expand Down

0 comments on commit 6c2010c

Please sign in to comment.