From fa5da782b83173b9478d9382028d717cc95c5fb7 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 14 Jan 2025 09:25:38 -0800 Subject: [PATCH] Quote `conda env remove` arguments when using full path --- src/managers/conda/condaUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/managers/conda/condaUtils.ts b/src/managers/conda/condaUtils.ts index d62a405c..15011d16 100644 --- a/src/managers/conda/condaUtils.ts +++ b/src/managers/conda/condaUtils.ts @@ -31,6 +31,7 @@ import { CondaStrings } from '../../common/localize'; import { showErrorMessage } from '../../common/errors/utils'; import { showInputBox, showQuickPick, withProgress } from '../../common/window.apis'; import { Installable, selectFromCommonPackagesToInstall } from '../common/pickers'; +import { quoteArgs } from '../../features/execution/execUtils'; export const CONDA_PATH_KEY = `${ENVS_EXTENSION_ID}:conda:CONDA_PATH`; export const CONDA_PREFIXES_KEY = `${ENVS_EXTENSION_ID}:conda:CONDA_PREFIXES`; @@ -585,7 +586,7 @@ async function createPrefixCondaEnvironment( } export async function deleteCondaEnvironment(environment: PythonEnvironment, log: LogOutputChannel): Promise { - let args = ['env', 'remove', '--yes', '--prefix', environment.environmentPath.fsPath]; + let args = quoteArgs(['env', 'remove', '--yes', '--prefix', environment.environmentPath.fsPath]); return await withProgress( { location: ProgressLocation.Notification,