diff --git a/news/2 Fixes/7160.md b/news/2 Fixes/7160.md new file mode 100644 index 000000000000..a7765d71ec16 --- /dev/null +++ b/news/2 Fixes/7160.md @@ -0,0 +1 @@ +Ensure commands run are not logged twice in Python output channel. diff --git a/src/client/common/process/pythonExecutionFactory.ts b/src/client/common/process/pythonExecutionFactory.ts index 510da059ef9a..e909a8d6dfe7 100644 --- a/src/client/common/process/pythonExecutionFactory.ts +++ b/src/client/common/process/pythonExecutionFactory.ts @@ -85,7 +85,6 @@ export class PythonExecutionFactory implements IPythonExecutionFactory { pythonPath = this.configService.getSettings(options.resource).pythonPath; } const processService: IProcessService = await this.processServiceFactory.create(options.resource); - processService.on('exec', this.logger.logProcess.bind(this.logger)); const windowsStoreInterpreterCheck = (await inDiscoveryExperiment(this.experimentService)) ? // Class methods may depend on other properties which belong to the class, so bind the correct context.