Skip to content

Commit

Permalink
Merge pull request #146 from PhilippMolitor/feature/manifest-path
Browse files Browse the repository at this point in the history
support cargo's `--manifest-path`
  • Loading branch information
burrbull authored Oct 16, 2024
2 parents b9c664f + 8945137 commit e8c5027
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ To see all the flags the proxied tool accepts run `cargo-{} -- --help`.{}",
.long("profile")
.value_name("PROFILE-NAME")
.help("Build artifacts with the specified profile"),
Arg::new("manifest-path")
.long("manifest-path")
.help("Path to Cargo.tom"),
Arg::new("features")
.long("features")
.short('F')
Expand Down Expand Up @@ -510,6 +513,10 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches, cargo: &mut Command) -> (BuildT
cargo.arg(profile);
}

if let Some(manifest_path) = matches.get_one::<String>("manifest-path") {
cargo.args(["--manifest-path", manifest_path]);
}

if let Some(features) = matches.get_many::<String>("features") {
for feature in features {
cargo.args(["--features", feature]);
Expand Down

0 comments on commit e8c5027

Please sign in to comment.