Skip to content

Running cargo update without a Cargo.lock ignores arguments #6872

Closed
@glandium

Description

@glandium

Problem
Say you want to test a crate against a specific version of one of its dependencies. One way to do that is to run cargo update -p $dep --precise $version. The problem is that when you do that without a pre-existing Cargo.lock (like, running that as the first command in a travis script), all the arguments are ignored, and you get the same Cargo.lock as you would plain cargo update, so without $dep at the wanted $version.

Notes

Output of cargo version:

cargo 1.34.0 (6789d8a0a 2019-04-01)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions