From 9013f0a4113e2fad8e3bd9c1259c7d756008c4ab Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Sun, 29 Oct 2023 10:59:12 -0400 Subject: [PATCH] docs: clarify config to use vendored source is printed to stdout --- src/doc/man/cargo-vendor.md | 10 ++++++++-- src/doc/man/generated_txt/cargo-vendor.txt | 11 ++++++++--- src/doc/src/commands/cargo-vendor.md | 10 ++++++++-- src/etc/man/cargo-vendor.1 | 16 ++++++++++++++-- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/doc/man/cargo-vendor.md b/src/doc/man/cargo-vendor.md index b30d0d8dd22..169e64db270 100644 --- a/src/doc/man/cargo-vendor.md +++ b/src/doc/man/cargo-vendor.md @@ -16,8 +16,10 @@ the vendor directory specified by `` will contain all remote sources from dependencies specified. Additional manifests beyond the default one can be specified with the `-s` option. -The `cargo vendor` command will also print out the configuration necessary -to use the vendored sources, which you will need to add to `.cargo/config.toml`. +The configuration necessary to use the vendored sources would be printed to +stdout after `cargo vendor` completes the vendoring process. +You will need to add or redirect it to your Cargo configuration file, +which is usually `.cargo/config.toml` locally for the current package. ## OPTIONS @@ -88,6 +90,10 @@ only a subset of the packages have changed. cargo vendor -s ../path/to/Cargo.toml +4. Vendor and redirect the necessary vendor configs to a config file. + + cargo vendor > path/to/my/cargo/config.toml + ## SEE ALSO {{man "cargo" 1}} diff --git a/src/doc/man/generated_txt/cargo-vendor.txt b/src/doc/man/generated_txt/cargo-vendor.txt index c325b753423..f0314aedbe8 100644 --- a/src/doc/man/generated_txt/cargo-vendor.txt +++ b/src/doc/man/generated_txt/cargo-vendor.txt @@ -13,9 +13,10 @@ DESCRIPTION remote sources from dependencies specified. Additional manifests beyond the default one can be specified with the -s option. - The cargo vendor command will also print out the configuration necessary - to use the vendored sources, which you will need to add to - .cargo/config.toml. + The configuration necessary to use the vendored sources would be printed + to stdout after cargo vendor completes the vendoring process. You will + need to add or redirect it to your Cargo configuration file, which is + usually .cargo/config.toml locally for the current package. OPTIONS Vendor Options @@ -157,6 +158,10 @@ EXAMPLES cargo vendor -s ../path/to/Cargo.toml + 4. Vendor and redirect the necessary vendor configs to a config file. + + cargo vendor > path/to/my/cargo/config.toml + SEE ALSO cargo(1) diff --git a/src/doc/src/commands/cargo-vendor.md b/src/doc/src/commands/cargo-vendor.md index cf47fc25658..84560a688fe 100644 --- a/src/doc/src/commands/cargo-vendor.md +++ b/src/doc/src/commands/cargo-vendor.md @@ -16,8 +16,10 @@ the vendor directory specified by `` will contain all remote sources from dependencies specified. Additional manifests beyond the default one can be specified with the `-s` option. -The `cargo vendor` command will also print out the configuration necessary -to use the vendored sources, which you will need to add to `.cargo/config.toml`. +The configuration necessary to use the vendored sources would be printed to +stdout after `cargo vendor` completes the vendoring process. +You will need to add or redirect it to your Cargo configuration file, +which is usually `.cargo/config.toml` locally for the current package. ## OPTIONS @@ -189,6 +191,10 @@ details on environment variables that Cargo reads. cargo vendor -s ../path/to/Cargo.toml +4. Vendor and redirect the necessary vendor configs to a config file. + + cargo vendor > path/to/my/cargo/config.toml + ## SEE ALSO [cargo(1)](cargo.html) diff --git a/src/etc/man/cargo-vendor.1 b/src/etc/man/cargo-vendor.1 index cb46f67cde4..67744532eb5 100644 --- a/src/etc/man/cargo-vendor.1 +++ b/src/etc/man/cargo-vendor.1 @@ -14,8 +14,10 @@ the vendor directory specified by \fB\fR will contain all remote sources f dependencies specified. Additional manifests beyond the default one can be specified with the \fB\-s\fR option. .sp -The \fBcargo vendor\fR command will also print out the configuration necessary -to use the vendored sources, which you will need to add to \fB\&.cargo/config.toml\fR\&. +The configuration necessary to use the vendored sources would be printed to +stdout after \fBcargo vendor\fR completes the vendoring process. +You will need to add or redirect it to your Cargo configuration file, +which is usually \fB\&.cargo/config.toml\fR locally for the current package. .SH "OPTIONS" .SS "Vendor Options" .sp @@ -205,5 +207,15 @@ cargo vendor \-s ../path/to/Cargo.toml .fi .RE .RE +.sp +.RS 4 +\h'-04' 4.\h'+01'Vendor and redirect the necessary vendor configs to a config file. +.sp +.RS 4 +.nf +cargo vendor > path/to/my/cargo/config.toml +.fi +.RE +.RE .SH "SEE ALSO" \fBcargo\fR(1)