Skip to content

--project/--directory only work as first cli option #10165

@Lasall

Description

@Lasall

Description

When using --project/-P or --directory/-C switch it only works when passed as first cli option, e.g. following command fails since 2.x:

poetry publish --repository xyz -C /path/to/repo

Looking at other programs (e.g. git), the changedir option is only allowed before the command, e.g. poetry -C /path/to/repo publish --repository xyz.

I'm not sure if this works as intended now, if so than it should be documented.

Workarounds

Move switch as first option, e.g.:

poetry publish -C /path/to/repo --repository xyz

Poetry Installation Method

pip

Operating System

Debian

Poetry Version

2.0.1

Poetry Configuration

-

Python Sysconfig

No response

Example pyproject.toml

Poetry Runtime Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions