diff --git a/extensions/data-workspace/src/main.ts b/extensions/data-workspace/src/main.ts index 2736cdbc66..c872169816 100644 --- a/extensions/data-workspace/src/main.ts +++ b/extensions/data-workspace/src/main.ts @@ -18,10 +18,18 @@ import { createNewProjectWithQuickpick } from './dialogs/newProjectQuickpick'; export async function activate(context: vscode.ExtensionContext): Promise { const workspaceService = new WorkspaceService(context); - await workspaceService.loadTempProjects(); - workspaceService.checkForProjectsNotAddedToWorkspace(); - context.subscriptions.push(vscode.workspace.onDidChangeWorkspaceFolders(async () => { - await workspaceService.checkForProjectsNotAddedToWorkspace(); + + // this is not being awaited to not block the rest of activate function from running while loading any temp projects and + // checking for projects not added to the workspace yet + workspaceService.loadTempProjects().then(() => { + return workspaceService.checkForProjectsNotAddedToWorkspace(); + }).catch(error => { + console.error(error); + vscode.window.showErrorMessage(error instanceof Error ? error.message : error); + }); + + context.subscriptions.push(vscode.workspace.onDidChangeWorkspaceFolders(() => { + workspaceService.checkForProjectsNotAddedToWorkspace(); })); const workspaceTreeDataProvider = new WorkspaceTreeDataProvider(workspaceService);