@@ -2,6 +2,7 @@ import { inject, injectable } from 'inversify';
22import * as path from 'path' ;
33import { ConfigurationTarget , Uri , window } from 'vscode' ;
44import { StopWatch } from '../../common/utils/stopWatch' ;
5+ import { SystemVariables } from '../../common/variables/systemVariables' ;
56import { traceError } from '../../logging' ;
67import { sendTelemetryEvent } from '../../telemetry' ;
78import { EventName } from '../../telemetry/constants' ;
@@ -36,7 +37,7 @@ export class PythonPathUpdaterService implements IPythonPathUpdaterServiceManage
3637 traceError ( reason ) ;
3738 }
3839 // do not wait for this to complete
39- this . sendTelemetry ( stopWatch . elapsedTime , failed , trigger , pythonPath ) . catch ( ( ex ) =>
40+ this . sendTelemetry ( stopWatch . elapsedTime , failed , trigger , pythonPath , wkspace ) . catch ( ( ex ) =>
4041 traceError ( 'Python Extension: sendTelemetry' , ex ) ,
4142 ) ;
4243 }
@@ -46,13 +47,15 @@ export class PythonPathUpdaterService implements IPythonPathUpdaterServiceManage
4647 failed : boolean ,
4748 trigger : 'ui' | 'shebang' | 'load' ,
4849 pythonPath : string | undefined ,
50+ wkspace ?: Uri ,
4951 ) {
5052 const telemetryProperties : PythonInterpreterTelemetry = {
5153 failed,
5254 trigger,
5355 } ;
5456 if ( ! failed && pythonPath ) {
55- const interpreterInfo = await this . pyenvs . getInterpreterInformation ( pythonPath ) ;
57+ const systemVariables = new SystemVariables ( undefined , wkspace ?. fsPath ) ;
58+ const interpreterInfo = await this . pyenvs . getInterpreterInformation ( systemVariables . resolveAny ( pythonPath ) ) ;
5659 if ( interpreterInfo ) {
5760 telemetryProperties . pythonVersion = interpreterInfo . version ?. raw ;
5861 }
0 commit comments