Commit 6d6087f 1 parent be686dd commit 6d6087f Copy full SHA for 6d6087f
File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ export class ProcessServiceFactory implements IProcessServiceFactory {
17
17
@inject ( IProcessLogger ) private readonly processLogger : IProcessLogger ,
18
18
@inject ( IDisposableRegistry ) private readonly disposableRegistry : IDisposableRegistry ,
19
19
) { }
20
- public async create ( resource ?: Uri ) : Promise < IProcessService > {
21
- const customEnvVars = await this . envVarsService . getEnvironmentVariables ( resource ) ;
20
+ public async create ( resource ?: Uri , options ?: { doNotUseCustomEnvs : boolean } ) : Promise < IProcessService > {
21
+ const customEnvVars = options ?. doNotUseCustomEnvs
22
+ ? undefined
23
+ : await this . envVarsService . getEnvironmentVariables ( resource ) ;
22
24
const proc : IProcessService = new ProcessService ( customEnvVars ) ;
23
25
this . disposableRegistry . push ( proc ) ;
24
26
return proc . on ( 'exec' , this . processLogger . logProcess . bind ( this . processLogger ) ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export interface IProcessService extends IDisposable {
55
55
export const IProcessServiceFactory = Symbol ( 'IProcessServiceFactory' ) ;
56
56
57
57
export interface IProcessServiceFactory {
58
- create ( resource ?: Uri ) : Promise < IProcessService > ;
58
+ create ( resource ?: Uri , options ?: { doNotUseCustomEnvs : boolean } ) : Promise < IProcessService > ;
59
59
}
60
60
61
61
export const IPythonExecutionFactory = Symbol ( 'IPythonExecutionFactory' ) ;
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi
192
192
args [ i ] = arg . toCommandArgumentForPythonExt ( ) ;
193
193
} ) ;
194
194
const command = `${ interpreterPath } ${ args . join ( ' ' ) } ` ;
195
- const processService = await this . processServiceFactory . create ( resource ) ;
195
+ const processService = await this . processServiceFactory . create ( resource , { doNotUseCustomEnvs : true } ) ;
196
196
const result = await processService . shellExec ( command , {
197
197
shell,
198
198
timeout : ENVIRONMENT_TIMEOUT ,
You can’t perform that action at this time.
0 commit comments