-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-offlineArea: offline modeArea: offline modeC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-update
Description
The following behavior was surprising to me:
$ cargo update
Updating crates.io index
Adding serde v1.0.124
$ cargo update -p serde --precise 1.0.123
Updating crates.io index
Updating serde v1.0.124 -> v1.0.123
$ cargo update -p serde --precise 1.0.124
Updating crates.io index
Updating serde v1.0.123 -> v1.0.124
$ cargo update -p serde --precise 1.0.123 --offline
error: you can't update in the offline mode
It seems to me that Cargo should already have all the information locally to perform the last update to 1.0.123 entirely offline. Why is network access required for that update?
As a workaround, editing an "=1.0.123"
dependency into the Cargo.toml and using offline build commands (cargo check --offline
) appears to perform that same update offline successfully.
Cargo version: most recent nightly -- cargo 1.52.0-nightly (c68432f 2021-03-02)
Metadata
Metadata
Assignees
Labels
A-offlineArea: offline modeArea: offline modeC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-update