From 894513713214a7d1664fc705b542ffe224af78ba Mon Sep 17 00:00:00 2001 From: Philipp Molitor Date: Mon, 14 Oct 2024 11:32:31 +0200 Subject: [PATCH] support cargo's `--manifest-path` --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index e5debd4..3720d1f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -220,6 +220,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') @@ -492,6 +495,10 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches, cargo: &mut Command) -> (BuildT cargo.arg(profile); } + if let Some(manifest_path) = matches.get_one::("manifest-path") { + cargo.args(["--manifest-path", manifest_path]); + } + if let Some(features) = matches.get_many::("features") { for feature in features { cargo.args(["--features", feature]);