Skip to content

Poetry environment locator doesn't apply system variables to poetryPath #16606

@tonybaloney

Description

@tonybaloney

Environment data

This applies to main (I'm running insiders-weekly)

Expected behaviour

Poetry path should apply variable substitution

  "python.poetryPath": "${env:HOME}/.local/bin/poetry",

But it isn't, so you can't use variable substitution to configure the poetry path.

The configuration setting is being loaded directly from config without systemVariables.resolveAny magic being applied

Cause

The PythonSettings class is doing variable substitution correctly https://github.com/microsoft/vscode-python/blob/main/src/client/common/configSettings.ts#L278-L279

This configuration variable is never used and the poetry environment discovery tool reads directly from config:
https://github.com/microsoft/vscode-python/blob/main/src/client/pythonEnvironments/discovery/locators/services/poetry.ts#L141

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions