From 64fca9911fa6a0ac695ad913f20466e5f2d26c5b Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 27 Nov 2025 08:54:54 -0800 Subject: [PATCH] Fix: Quote conda executable path to handle spaces in _runConda function --- src/managers/conda/condaUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/managers/conda/condaUtils.ts b/src/managers/conda/condaUtils.ts index 80ffed55..ba912e40 100644 --- a/src/managers/conda/condaUtils.ts +++ b/src/managers/conda/condaUtils.ts @@ -43,7 +43,7 @@ import { } from '../../common/window.apis'; import { getConfiguration } from '../../common/workspace.apis'; import { ShellConstants } from '../../features/common/shellConstants'; -import { quoteArgs } from '../../features/execution/execUtils'; +import { quoteArgs, quoteStringIfNecessary } from '../../features/execution/execUtils'; import { isNativeEnvInfo, NativeEnvInfo, @@ -203,9 +203,10 @@ async function _runConda( ): Promise { const deferred = createDeferred(); args = quoteArgs(args); + const quotedConda = quoteStringIfNecessary(conda); const timer = new StopWatch(); - deferred.promise.finally(() => traceInfo(`Ran conda in ${timer.elapsedTime}: ${conda} ${args.join(' ')}`)); - const proc = ch.spawn(conda, args, { shell: true }); + deferred.promise.finally(() => traceInfo(`Ran conda in ${timer.elapsedTime}: ${quotedConda} ${args.join(' ')}`)); + const proc = ch.spawn(quotedConda, args, { shell: true }); token?.onCancellationRequested(() => { proc.kill();