Skip to content

uv add adds a depencency even if there is a failure during installation #6486

@tjquillan

Description

@tjquillan

When running uv add fails to install the package, it is still added to the dependency array of pyproject.toml causing future invocations of uv add to fail as well.

Reproduction Steps

  1. Run uv add pytorch in a blank project
  • This will fail notifying you that Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
  1. Observe that the pyproject.toml added it to the dependencies array despite this failure.
  2. When you then attempt to run uv add torch as instructed, it will fail in the same way as pytorch is now in the dependency array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContribution especially encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions