mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
cargo-locate-project: add page (#10999)
* cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * add page: cargo-locate-project * cargo-locate-project: add page * cargo-locate-project: add page * Apply suggestions from code review Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> --------- Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
parent
a11ecac059
commit
3c1b1ea1f6
1 changed files with 21 additions and 0 deletions
21
pages/common/cargo-locate-project.md
Normal file
21
pages/common/cargo-locate-project.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# cargo locate-project
|
||||||
|
|
||||||
|
> Print the full path to the `Cargo.toml` manifest of the current project.
|
||||||
|
> If the project is part of a workspace, the manifest of the project is shown, rather than that of the workspace.
|
||||||
|
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-locate-project.html>.
|
||||||
|
|
||||||
|
- Print the JSON object to `stdout` with full path to the `Cargo.toml` manifest:
|
||||||
|
|
||||||
|
`cargo locate-project`
|
||||||
|
|
||||||
|
- Print the project path in the specified format:
|
||||||
|
|
||||||
|
`cargo locate-project --message-format {{plain|json}}`
|
||||||
|
|
||||||
|
- Print the `Cargo.toml` manifest located at the given path:
|
||||||
|
|
||||||
|
`cargo locate-project --manifest-path {{path/to/Cargo.toml}}`
|
||||||
|
|
||||||
|
- Print the `Cargo.toml` manifest located at the root of the workspace as opposed to the current workspace member:
|
||||||
|
|
||||||
|
`cargo locate-project --workspace`
|
Loading…
Add table
Reference in a new issue