Skip to content

Commit a0fb1c5

Browse files
authored
Merge pull request #150 from PhilippMolitor/feature/cargo-config
add cargo `--config` arg
2 parents 0f4111a + 2d1c4a4 commit a0fb1c5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ To see all the flags the proxied tool accepts run `cargo-{} -- --help`.{}",
235235
.long("target")
236236
.value_name("TRIPLE")
237237
.help("Target triple for which the code is compiled"),
238+
Arg::new("config")
239+
.long("config")
240+
.value_name("CONFIG")
241+
.help("Override a configuration value"),
238242
Arg::new("color")
239243
.long("color")
240244
.action(ArgAction::Set)
@@ -459,6 +463,12 @@ fn cargo_build_args<'a>(matches: &'a ArgMatches, cargo: &mut Command) -> (BuildT
459463
cargo.arg(package);
460464
}
461465

466+
if let Some(config) = matches.get_many::<String>("config") {
467+
for c in config {
468+
cargo.args(["--config", c]);
469+
}
470+
}
471+
462472
if let Some(jobs) = matches.get_one::<String>("jobs") {
463473
cargo.arg("-j");
464474
cargo.arg(jobs);

0 commit comments

Comments
 (0)