diff --git a/news/2 Fixes/17576.md b/news/2 Fixes/17576.md new file mode 100644 index 000000000000..72e8ad8d11c8 --- /dev/null +++ b/news/2 Fixes/17576.md @@ -0,0 +1 @@ +Add timeout when discovery runs `conda info --json` command. diff --git a/src/client/pythonEnvironments/common/environmentManagers/conda.ts b/src/client/pythonEnvironments/common/environmentManagers/conda.ts index 025cb7fc75b5..300b218864ae 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/conda.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/conda.ts @@ -354,7 +354,7 @@ export class Conda { // eslint-disable-next-line class-methods-use-this private async getInfoCached(command: string): Promise { const disposables = new Set(); - const result = await exec(command, ['info', '--json'], {}, disposables); + const result = await exec(command, ['info', '--json'], { timeout: 50000 }, disposables); traceVerbose(`conda info --json: ${result.stdout}`); // Ensure the process we started is cleaned up.