Skip to content

Commit 1f01363

Browse files
committed
update to not rely on poetry version
1 parent 166196d commit 1f01363

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

src/managers/poetry/main.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Disposable, LogOutputChannel } from 'vscode';
22
import { PythonEnvironmentApi } from '../../api';
3-
import { traceInfo, traceWarn } from '../../common/logging';
3+
import { traceInfo } from '../../common/logging';
44
import { getPythonApi } from '../../features/pythonApi';
55
import { NativePythonFinder } from '../common/nativePythonFinder';
66
import { PoetryManager } from './poetryManager';
@@ -17,18 +17,11 @@ export async function registerPoetryFeatures(
1717
try {
1818
const poetryPath = await getPoetry(nativeFinder);
1919
if (poetryPath) {
20-
const version = await getPoetryVersion(poetryPath);
21-
if (!version) {
22-
traceWarn(
23-
'Poetry found at {0}, but unable to determine version. Poetry features will not be enabled.',
24-
poetryPath,
25-
);
26-
return;
27-
}
2820
traceInfo(
29-
'The `shell` command is not available by default in Poetry versions 2.0.0 and above. Therefore all shell activation will be handled by calling `source <path-to-activate>`. If you face any problems with shell activation, please file an issue at https://github.com/microsoft/vscode-python-environments/issues to help us improve this implementation. Note the current version of Poetry is {0}.',
30-
version,
21+
'The `shell` command is not available by default in Poetry versions 2.0.0 and above. Therefore all shell activation will be handled by calling `source <path-to-activate>`. If you face any problems with shell activation, please file an issue at https://github.com/microsoft/vscode-python-environments/issues to help us improve this implementation.',
3122
);
23+
const version = await getPoetryVersion(poetryPath);
24+
traceInfo(`Poetry found at ${poetryPath}, version: ${version}`);
3225
const envManager = new PoetryManager(nativeFinder, api);
3326
const pkgManager = new PoetryPackageManager(api, outputChannel, envManager);
3427

0 commit comments

Comments
 (0)