diff --git a/src/doc/man/cargo-fetch.md b/src/doc/man/cargo-fetch.md index b8a0eb666209..e896ca7581e5 100644 --- a/src/doc/man/cargo-fetch.md +++ b/src/doc/man/cargo-fetch.md @@ -2,6 +2,7 @@ {{~*set command="fetch"}} {{~*set actionverb="Fetch"}} {{~*set target-default-to-all-arch=true}} +{{~*set no-fetch-in-offline=true}} {{~*set multitarget=true}} ## NAME diff --git a/src/doc/man/generated_txt/cargo-fetch.txt b/src/doc/man/generated_txt/cargo-fetch.txt index cbd3169c3131..1c30a3540f48 100644 --- a/src/doc/man/generated_txt/cargo-fetch.txt +++ b/src/doc/man/generated_txt/cargo-fetch.txt @@ -91,8 +91,7 @@ OPTIONS Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as - indicated in the local copy of the index. See the cargo-fetch(1) - command to download dependencies before going offline. + indicated in the local copy of the index. May also be specified with the net.offline config value . diff --git a/src/doc/man/includes/options-locked.md b/src/doc/man/includes/options-locked.md index c9ac9524e3cd..b048d371aff0 100644 --- a/src/doc/man/includes/options-locked.md +++ b/src/doc/man/includes/options-locked.md @@ -18,8 +18,10 @@ proceed without the network if possible. Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. +{{#if (ne no-fetch-in-offline true)}} See the {{man "cargo-fetch" 1}} command to download dependencies before going offline. +{{/if}} May also be specified with the `net.offline` [config value](../reference/config.html). -{{/option}} +{{/option}} \ No newline at end of file diff --git a/src/doc/src/commands/cargo-fetch.md b/src/doc/src/commands/cargo-fetch.md index aa0be675c2ca..19a00136846b 100644 --- a/src/doc/src/commands/cargo-fetch.md +++ b/src/doc/src/commands/cargo-fetch.md @@ -97,9 +97,7 @@ the network is not available. With this flag, Cargo will attempt to proceed without the network if possible.

Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even -if there might be a newer version as indicated in the local copy of the index. -See the cargo-fetch(1) command to download dependencies before going -offline.

+if there might be a newer version as indicated in the local copy of the index.

May also be specified with the net.offline config value. diff --git a/src/etc/man/cargo-fetch.1 b/src/etc/man/cargo-fetch.1 index 3779b9c28621..428dc882a81f 100644 --- a/src/etc/man/cargo-fetch.1 +++ b/src/etc/man/cargo-fetch.1 @@ -106,8 +106,6 @@ proceed without the network if possible. Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. -See the \fBcargo\-fetch\fR(1) command to download dependencies before going -offline. .sp May also be specified with the \fBnet.offline\fR \fIconfig value\fR \&. .RE diff --git a/tests/testsuite/cargo_fetch/help/stdout.log b/tests/testsuite/cargo_fetch/help/stdout.log index 5645a6c033df..aecb3a67d44d 100644 --- a/tests/testsuite/cargo_fetch/help/stdout.log +++ b/tests/testsuite/cargo_fetch/help/stdout.log @@ -17,6 +17,5 @@ Manifest Options: --manifest-path Path to Cargo.toml --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date - --offline Run without accessing the network Run `cargo help fetch` for more detailed information.