Skip to content

Commit

Permalink
Fix startup telemetry issue (microsoft#21203)
Browse files Browse the repository at this point in the history
Could fix microsoft#20874 based
on error trace.
  • Loading branch information
Kartik Raj authored and eleanorjboyd committed May 12, 2023
1 parent 2c91ca7 commit 6c025ba
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 6c025ba

Please sign in to comment.