chore(doc): doc for custom subcommands look up.#13203
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 27, 2023
Merged
Conversation
Collaborator
|
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
weihanglo
reviewed
Dec 25, 2023
| `cargo-${command}`. The external tool must be present in one of the user's | ||
| `$PATH` directories. | ||
|
|
||
| > Note: Cargo looks for custom subcommands in `$PATH `and then `$CARGO_HOME/bin`, |
Member
There was a problem hiding this comment.
This seems a bit incorrect. I may emphasize two things:
- By default, tools in
$CARGO_HOME/bintake precedence over tools in$PATH. - Users can put
$CARGO_HOME/binin$PATHto control the precedence.
Contributor
Author
There was a problem hiding this comment.
By default, tools in $CARGO_HOME/bin take precedence over tools in $PATH.
Yes, Indeed.
Contributor
Author
There was a problem hiding this comment.
I've polished the description to the best of my ability, hoping to get it right.
0b819ba to
0dc45b4
Compare
weihanglo
reviewed
Dec 26, 2023
Comment on lines
+268
to
+270
| > Note: By default, Cargo invokes custom subcommand in `$CARGO_HOME/bin` | ||
| > instead of `$PATH`. If you want to change this behavior, you can put | ||
| > `$CARGO_HOME/bin` in `$PATH` to control the precedence. |
Member
There was a problem hiding this comment.
"instead of" doesn't convey the precedence. How about this?
Suggested change
| > Note: By default, Cargo invokes custom subcommand in `$CARGO_HOME/bin` | |
| > instead of `$PATH`. If you want to change this behavior, you can put | |
| > `$CARGO_HOME/bin` in `$PATH` to control the precedence. | |
| > **Note**: Cargo defaults to prioritizing external tools in `$CARGO_HOME/bin` | |
| > over `$PATH`. Users can override this precedence by adding `$CARGO_HOME/bin` | |
| > to `$PATH`. |
Contributor
Author
There was a problem hiding this comment.
I've used what you suggested and it looks pretty good without any grammar problems
0dc45b4 to
d71b2bc
Compare
weihanglo
approved these changes
Dec 27, 2023
Member
|
Thank you :) @bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 1, 2024
Update cargo 7 commits in ac6bbb33293d8d424c17ecdb42af3aac25fb7295..ef94adb92704acf3967be8cf73ac0b01d818c47a 2023-12-26 23:22:08 +0000 to 2023-12-31 02:20:45 +0000 - cleanup: Remove error-format special-case in `cargo fix` (rust-lang/cargo#13224) - `cargo fix`: always inherit the jobserver (rust-lang/cargo#13225) - Bump cargo-credential to 0.4.3 (rust-lang/cargo#13221) - `cargo add` - fix for adding features from repository with multiple packages. (rust-lang/cargo#13213) - Remove repetitive words (rust-lang/cargo#13216) - Add cargo:rustc-cdylib-link-arg into RESERVED_PREFIXES list (rust-lang/cargo#13212) - chore(doc): doc for custom subcommands look up. (rust-lang/cargo#13203) r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 3, 2024
Update cargo 11 commits in ac6bbb33293d8d424c17ecdb42af3aac25fb7295..add15366eaf3f3eb84717d3b8b71902ca36a7c84 2023-12-26 23:22:08 +0000 to 2024-01-02 03:24:42 +0000 - chore(deps): update gix (rust-lang/cargo#13230) - chore(deps): update alpine docker tag to v3.19 (rust-lang/cargo#13228) - rustfix: Support inserting new lines. (rust-lang/cargo#13226) - Fix fix::fix_in_dependency to not rely on rustc (rust-lang/cargo#13220) - cleanup: Remove error-format special-case in `cargo fix` (rust-lang/cargo#13224) - `cargo fix`: always inherit the jobserver (rust-lang/cargo#13225) - Bump cargo-credential to 0.4.3 (rust-lang/cargo#13221) - `cargo add` - fix for adding features from repository with multiple packages. (rust-lang/cargo#13213) - Remove repetitive words (rust-lang/cargo#13216) - Add cargo:rustc-cdylib-link-arg into RESERVED_PREFIXES list (rust-lang/cargo#13212) - chore(doc): doc for custom subcommands look up. (rust-lang/cargo#13203)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
as the #13194 metions, the lookup rules for custom subcommands are only reflected in comments inside the code, and it is time to inform users of this behavior through documentation.
How should we test and review this PR?
Additional information