Skip to content

Commit c4032b2

Browse files
author
Kartik Raj
authored
Ensure conda info --json times out after 50 seconds (#17576)
* Ensure conda info --json times out after 60 seconds * News entry * Update time to 50 seconds
1 parent 62d99e1 commit c4032b2

File tree

2 files changed

+2
-1
lines changed
  • news/2 Fixes
  • src/client/pythonEnvironments/common/environmentManagers

2 files changed

+2
-1
lines changed

news/2 Fixes/17576.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add timeout when discovery runs `conda info --json` command.

src/client/pythonEnvironments/common/environmentManagers/conda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export class Conda {
354354
// eslint-disable-next-line class-methods-use-this
355355
private async getInfoCached(command: string): Promise<CondaInfo> {
356356
const disposables = new Set<IDisposable>();
357-
const result = await exec(command, ['info', '--json'], {}, disposables);
357+
const result = await exec(command, ['info', '--json'], { timeout: 50000 }, disposables);
358358
traceVerbose(`conda info --json: ${result.stdout}`);
359359

360360
// Ensure the process we started is cleaned up.

0 commit comments

Comments
 (0)