-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document external cargo subcommand PATH precedence #13194
Comments
Hello,
And I see you desired |
This is a concern not with cargo-nextest but with how third-party subcommands are loaded. On mobile so can't look everything up but cargo intentionally prefers the copy of packages it has installed. You can customize this by putting cargo's bin directory in PATH. If cargo sees it there, it will respect the users precedence. |
Have we documented this behavior in The Cargo Book? If not, I would like to propose this as a documentation issue. Lines 247 to 270 in 363a2d1
|
Updating the documentation sounds good to me! |
cargo
's Subcommand
@rustbot claim I plan to add |
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
Problem
I have encountered an issue with the
cargo nextest
subcommand where it does not select the expected subcommand's version.Steps
Here are the details of the problem:
cargo-nextest
in my PATH, located at/nix/store/3yl7vgm2qkp7skr5gskbfd457f6g43cg-cargo-nextest-0.9.66/bin/cargo-nextest
, and its version is 0.9.66.cargo-nextest
installed in~/.cargo/bin
, and its version is 0.9.59.bash-5.2$ ~/.cargo/bin/cargo-nextest --version cargo-nextest 0.9.59
Running
~/.cargo/bin/cargo-nextest --version
confirms that the version installed in~/.cargo/bin
is indeed 0.9.59.However, when I execute
cargo nextest --version
, it incorrectly selects version 0.9.59 from~/.cargo/bin
, instead of the desired version 0.9.66 from/nix/store/3yl7vgm2qkp7skr5gskbfd457f6g43cg-cargo-nextest-0.9.66/bin/cargo-nextest
.This behavior seems inconsistent and unexpected. It would be helpful if the
cargo
command could prioritize the version in the path/nix/store/3yl7vgm2qkp7skr5gskbfd457f6g43cg-cargo-nextest-0.9.66/bin
when invoking thecargo nextest
subcommand.Thank you for your attention to this issue, and please let me know if you need any further information to reproduce or investigate the problem.
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: