Skip to content

--with and --directory args are heavily ordering dependent #10036

@palfrey

Description

@palfrey

Description

I have a polylith project setup with a pyproject.toml in the root and others in folders.

If I run Poetry with something like --with dev --directory=projects/demo-project it installs the dependencies of the root project, not the projects/demo-project folder. If I swap the arguments over, it uses the projects/demo-project pyproject.toml, not the root one.

Workarounds

--directory first, everything else later

Poetry Installation Method

install.python-poetry.org

Operating System

MacOS 15

Poetry Version

2.0.1

Poetry Configuration

Nothing set, this is in CI

Python Sysconfig

sysconfig.log
Paste the output of 'python -m sysconfig', over this line.

Example pyproject.toml

No response

Poetry Runtime Logs

poetry-runtime.log
Paste the output of 'poetry -vvv <command>', over this line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions