Skip to content

Commit 322b909

Browse files
edvilmeCopilot
andauthored
Fix command assignment for package version retrieval
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent b22fbd8 commit 322b909

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/managers/builtin/pipPackageManager.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,13 @@ export class PipPackageManager implements PackageManager, Disposable {
328328
}
329329

330330
async getPackageAvailableVersions(environment: PythonEnvironment, packageName: string): Promise<Pep440Version[]> {
331-
const command = await this._getPackageAvailableVersionsCommand(environment);
332331
const baseVersion = environment.version
333332
? PythonVersion.tryParse(environment.version)?.toReleaseString()
334333
: undefined;
335334
if (!baseVersion) {
336335
throw new Error(`Python version is unavailable for environment: ${environment.envId.id}`);
337336
}
337+
const command = await this._getPackageAvailableVersionsCommand(environment);
338338
const versions = await command.execute({ packageName, pythonVersion: baseVersion });
339339
return versions.sort((a, b) => compare(b.public, a.public));
340340
}

0 commit comments

Comments
 (0)