Skip to content

Commit 7625c79

Browse files
authored
Quote conda env remove arguments when using full path (#113)
Closes #103
1 parent 9bc75a5 commit 7625c79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/managers/conda/condaUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { CondaStrings } from '../../common/localize';
3131
import { showErrorMessage } from '../../common/errors/utils';
3232
import { showInputBox, showQuickPick, withProgress } from '../../common/window.apis';
3333
import { Installable, selectFromCommonPackagesToInstall } from '../common/pickers';
34+
import { quoteArgs } from '../../features/execution/execUtils';
3435

3536
export const CONDA_PATH_KEY = `${ENVS_EXTENSION_ID}:conda:CONDA_PATH`;
3637
export const CONDA_PREFIXES_KEY = `${ENVS_EXTENSION_ID}:conda:CONDA_PREFIXES`;
@@ -585,7 +586,7 @@ async function createPrefixCondaEnvironment(
585586
}
586587

587588
export async function deleteCondaEnvironment(environment: PythonEnvironment, log: LogOutputChannel): Promise<boolean> {
588-
let args = ['env', 'remove', '--yes', '--prefix', environment.environmentPath.fsPath];
589+
let args = quoteArgs(['env', 'remove', '--yes', '--prefix', environment.environmentPath.fsPath]);
589590
return await withProgress(
590591
{
591592
location: ProgressLocation.Notification,

0 commit comments

Comments
 (0)