Auto merge of #11763 - jofas:fix-for-11660, r=weihanglo

Added documentation for the configuration discovery of `cargo install` to the man pages

Fixes #11660.
This commit is contained in:
bors 2023-02-26 11:32:16 +00:00
commit 447ccb4aba
4 changed files with 41 additions and 1 deletions

View file

@ -55,6 +55,8 @@ specified by setting the `CARGO_TARGET_DIR` environment variable to a relative
path. In particular, this can be useful for caching build artifacts on
continuous integration systems.
### Dealing with the Lockfile
By default, the `Cargo.lock` file that is included with the package will be
ignored. This means that Cargo will recompute which versions of dependencies
to use, possibly using newer versions that have been released since the
@ -69,6 +71,16 @@ not start publishing `Cargo.lock` files until version 1.37, which means
packages published with prior versions will not have a `Cargo.lock` file
available.
### Configuration Discovery
This command operates on system or user level, not project level.
This means that the local [configuration discovery] is ignored.
Instead, the configuration discovery begins at `$CARGO_HOME/config.toml`.
If the package is installed with `--path $PATH`, the local configuration
will be used, beginning discovery at `$PATH/.cargo/config.toml`.
[configuration discovery]: ../reference/config.html#hierarchical-structure
## OPTIONS
### Install Options

View file

@ -65,6 +65,7 @@ DESCRIPTION
variable to a relative path. In particular, this can be useful for
caching build artifacts on continuous integration systems.
Dealing with the Lockfile
By default, the Cargo.lock file that is included with the package will
be ignored. This means that Cargo will recompute which versions of
dependencies to use, possibly using newer versions that have been
@ -79,6 +80,15 @@ DESCRIPTION
Cargo.lock files until version 1.37, which means packages published with
prior versions will not have a Cargo.lock file available.
Configuration Discovery
This command operates on system or user level, not project level. This
means that the local configuration discovery
<https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure>
is ignored. Instead, the configuration discovery begins at
$CARGO_HOME/config.toml. If the package is installed with --path $PATH,
the local configuration will be used, beginning discovery at
$PATH/.cargo/config.toml.
OPTIONS
Install Options
--vers version, --version version

View file

@ -62,6 +62,8 @@ specified by setting the `CARGO_TARGET_DIR` environment variable to a relative
path. In particular, this can be useful for caching build artifacts on
continuous integration systems.
### Dealing with the Lockfile
By default, the `Cargo.lock` file that is included with the package will be
ignored. This means that Cargo will recompute which versions of dependencies
to use, possibly using newer versions that have been released since the
@ -76,6 +78,16 @@ not start publishing `Cargo.lock` files until version 1.37, which means
packages published with prior versions will not have a `Cargo.lock` file
available.
### Configuration Discovery
This command operates on system or user level, not project level.
This means that the local [configuration discovery] is ignored.
Instead, the configuration discovery begins at `$CARGO_HOME/config.toml`.
If the package is installed with `--path $PATH`, the local configuration
will be used, beginning discovery at `$PATH/.cargo/config.toml`.
[configuration discovery]: ../reference/config.html#hierarchical-structure
## OPTIONS
### Install Options

View file

@ -87,7 +87,7 @@ in a temporary target directory. To avoid this, the target directory can be
specified by setting the \fBCARGO_TARGET_DIR\fR environment variable to a relative
path. In particular, this can be useful for caching build artifacts on
continuous integration systems.
.sp
.SS "Dealing with the Lockfile"
By default, the \fBCargo.lock\fR file that is included with the package will be
ignored. This means that Cargo will recompute which versions of dependencies
to use, possibly using newer versions that have been released since the
@ -101,6 +101,12 @@ will not receive any fixes or updates to any dependency. Note that Cargo did
not start publishing \fBCargo.lock\fR files until version 1.37, which means
packages published with prior versions will not have a \fBCargo.lock\fR file
available.
.SS "Configuration Discovery"
This command operates on system or user level, not project level.
This means that the local \fIconfiguration discovery\fR <https://doc.rust\-lang.org/cargo/reference/config.html#hierarchical\-structure> is ignored.
Instead, the configuration discovery begins at \fB$CARGO_HOME/config.toml\fR\&.
If the package is installed with \fB\-\-path $PATH\fR, the local configuration
will be used, beginning discovery at \fB$PATH/.cargo/config.toml\fR\&.
.SH "OPTIONS"
.SS "Install Options"
.sp