Skip to content

Commit

Permalink
Ensure cancellation is supported for conda env creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Feb 27, 2023
1 parent 84e3309 commit 1eb3033
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ async function createEnvironment(options?: CreateEnvironmentOptions): Promise<Cr
throw ex;
}

if (version === undefined) {
traceError('Python version was not selected for creating conda environment.');
return MultiStepAction.Cancel;
}
return MultiStepAction.Continue;
},
undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ suite('Conda Creation provider tests', () => {
});
pickPythonVersionStub.resolves(undefined);

assert.isUndefined(await condaProvider.createEnvironment());
await assert.isRejected(condaProvider.createEnvironment());
});

test('Create conda environment', async () => {
Expand Down

0 comments on commit 1eb3033

Please sign in to comment.