Skip to content

option to fail if poetry.lock doesn't match pyproject.toml #5003

@DetachHead

Description

@DetachHead
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

steps

1: add dependencies and run poetry update
2: change dependencies and run poetry install

expected

The command fails as you will install dependencies that are not reflecting the project configuration

actual

All you get is a warning

Feature Request

currently when you run poetry install with an outdated lock file, you get this warning:

Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.

it would be nice if there was an option to make this an error instead of a warning. in my case i want the CI to fail if poetry.lock is outdated.

the warning can be easily missed when running in CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliRelated to the command linekind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions