Closed danakj closed 10 months ago
Not sure if there's an expectation for tests here, but locally I did the following:
% cargo run -- vet --cargo-arg=-Zbindeps --verbose info
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Running `target/debug/cargo-vet vet --cargo-arg=-Zbindeps --verbose info`
INFO Running: Command {
program: "/home/danakj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo",
args: [
"/home/danakj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo",
"metadata",
"--format-version",
"1",
"--all-features",
"--locked",
"--color=always",
"-Zbindeps", <---------------- added here
],
create_pidfd: false,
}
INFO Final Metadata Config:
...
Thanks for the patch! @mystor can you review?
Oh I see there are tests for the help markdown, I will update those.
While it'd be nice to have tests for this, it's a fairly niche feature, and is useful for something somewhat niche, so I think we can get away without functionality tests for this change.
Thanks for the quick review!
Some projects may require additional arguments in the cargo metadata command in order to parse their Cargo.toml. For example Chromium requires
-Zbindeps
as it uses the feature for a dependency on cxxbridge-cmd. This allows such projects to usecargo vet --cargo-arg=<STUFF>
in order to add one or more arguments to the cargo metadata command line.