Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
if: matrix.rust != 'stable'
run: cargo install --locked --path . -f

- name: run cargo-profdata --help
run: cargo profdata -- --help

- name: Run cargo-nm
run: cargo nm --bin cargo-nm -- --undefined-only

Expand Down
22 changes: 12 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,18 @@ To see all the flags the proxied tool accepts run `cargo-{} -- --help`.{}",

pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
let mut metadata_command = MetadataCommand::new();
if let Some(features) = matches.get_many::<String>("features") {
metadata_command.features(CargoOpt::SomeFeatures(
features.map(|s| s.to_owned()).collect(),
));
}
if matches.get_flag("no-default-features") {
metadata_command.features(CargoOpt::NoDefaultFeatures);
}
if matches.get_flag("all-features") {
metadata_command.features(CargoOpt::AllFeatures);
if tool.needs_build() {
if let Some(features) = matches.get_many::<String>("features") {
metadata_command.features(CargoOpt::SomeFeatures(
features.map(|s| s.to_owned()).collect(),
));
}
if matches.get_flag("no-default-features") {
metadata_command.features(CargoOpt::NoDefaultFeatures);
}
if matches.get_flag("all-features") {
metadata_command.features(CargoOpt::AllFeatures);
}
}
if let Some(path) = matches.get_one::<String>("manifest-path") {
metadata_command.manifest_path(path);
Expand Down
Loading