Skip to content

Commit

Permalink
Fix startup telemetry issue (#21203)
Browse files Browse the repository at this point in the history
Could fix #20874 based
on error trace.
  • Loading branch information
Kartik Raj authored May 9, 2023
1 parent 17daae4 commit a85eb3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client/startupTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
return { workspaceFolderCount, terminal: terminalShellType };
}
const interpreterService = serviceContainer.get<IInterpreterService>(IInterpreterService);
const mainWorkspaceUri = workspaceService.workspaceFolders ? workspaceService.workspaceFolders[0].uri : undefined;
const mainWorkspaceUri = workspaceService.workspaceFolders?.length
? workspaceService.workspaceFolders[0].uri
: undefined;
const hasPythonThree = await interpreterService.hasInterpreters(async (item) => item.version?.major === 3);
// If an unknown type environment can be found from windows registry or path env var,
// consider them as global type instead of unknown. Such types can only be known after
Expand Down

0 comments on commit a85eb3b

Please sign in to comment.