Skip to content

Commit d25d2d5

Browse files
authored
fix: quick create does not show up when there only one provider (#372)
Fixes microsoft/vscode-python#25022
1 parent 58f0ed7 commit d25d2d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/common/pickers/managers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { QuickPickItem, QuickPickItemKind } from 'vscode';
22
import { PythonProjectCreator } from '../../api';
33
import { InternalEnvironmentManager, InternalPackageManager } from '../../internal.api';
44
import { Common, Pickers } from '../localize';
5-
import { showQuickPickWithButtons, showQuickPick } from '../window.apis';
5+
import { showQuickPick, showQuickPickWithButtons } from '../window.apis';
66

77
function getDescription(mgr: InternalEnvironmentManager | InternalPackageManager): string | undefined {
88
if (mgr.description) {
@@ -27,7 +27,8 @@ export async function pickEnvironmentManager(
2727
return;
2828
}
2929

30-
if (managers.length === 1) {
30+
if (managers.length === 1 && !managers[0].supportsQuickCreate) {
31+
// If there's only one manager and it doesn't support quick create, return its ID directly.
3132
return managers[0].id;
3233
}
3334

0 commit comments

Comments
 (0)