Skip to content

Commit 9817470

Browse files
committed
fix issue with quick create
1 parent 2f7e891 commit 9817470

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

package-lock.json

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/managers/builtin/venvStepBasedFlow.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { EventNames } from '../../common/telemetry/constants';
77
import { sendTelemetryEvent } from '../../common/telemetry/sender';
88
import { showInputBoxWithButtons, showQuickPickWithButtons } from '../../common/window.apis';
99
import { NativePythonFinder } from '../common/nativePythonFinder';
10-
import { getWorkspacePackagesToInstall, PipPackages } from './pipUtils';
10+
import { getProjectInstallable, getWorkspacePackagesToInstall, PipPackages } from './pipUtils';
1111
import { CreateEnvironmentResult, createWithProgress, ensureGlobalEnv } from './venvUtils';
1212

1313
/**
@@ -332,8 +332,17 @@ export async function createStepBasedVenvFlow(
332332
sendTelemetryEvent(EventNames.VENV_CREATION, undefined, { creationType: 'quick' });
333333
// Use the default .venv name for quick create
334334
const quickEnvPath = path.join(venvRoot.fsPath, '.venv');
335+
336+
// Get workspace dependencies to install
337+
const project = api.getPythonProject(venvRoot);
338+
const installables = await getProjectInstallable(api, project ? [project] : undefined);
339+
const allPackages = [];
340+
allPackages.push(...(installables?.flatMap((i) => i.args ?? []) ?? []));
341+
if (options.additionalPackages) {
342+
allPackages.push(...options.additionalPackages);
343+
}
335344
return await createWithProgress(nativeFinder, api, log, manager, state.basePython, venvRoot, quickEnvPath, {
336-
install: options.additionalPackages || [],
345+
install: allPackages,
337346
uninstall: [],
338347
});
339348
}

0 commit comments

Comments
 (0)