Skip to content

Commit 1f70597

Browse files
committed
Auto merge of #13203 - linyihai:subcommand-doc, r=weihanglo
chore(doc): doc for custom subcommands look up. ### 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
2 parents ac6bbb3 + d71b2bc commit 1f70597

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/doc/src/reference/external-tools.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ cargo `(?<command>[^ ]+)` into an invocation of an external tool
265265
`cargo-${command}`. The external tool must be present in one of the user's
266266
`$PATH` directories.
267267
268+
> **Note**: Cargo defaults to prioritizing external tools in `$CARGO_HOME/bin`
269+
> over `$PATH`. Users can override this precedence by adding `$CARGO_HOME/bin`
270+
> to `$PATH`.
271+
268272
When Cargo invokes a custom subcommand, the first argument to the subcommand
269273
will be the filename of the custom subcommand, as usual. The second argument
270274
will be the subcommand name itself. For example, the second argument would be

0 commit comments

Comments
 (0)