Skip to content

poetry remove --dry-run modifies poetry.lock #3666

@samestep

Description

@samestep
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

As the title states, running poetry remove --dry-run modifies poetry.lock. Example:

poetry new remove-dry-run-bug
cd $_
sed -i '' 's/^authors = \[".*"\]/authors = []/' pyproject.toml
cat pyproject.toml # see gist
poetry add pyyaml
cp poetry.lock{,.old}
poetry remove --dry-run pyyaml
git diff --no-index poetry.lock{.old,} | tee poetry.lock.diff # see gist

This causes subsequent commands (such as poetry show) to fail.

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