Merge branch 'fix-flag-forwarding'
Conflicts were handled manually. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
commit
e39bd7fc72
1 changed files with 14 additions and 7 deletions
|
@ -377,13 +377,20 @@ fn forward_commandline_arguments(m: &ArgMatches, scmd: &mut Vec<String>) {
|
||||||
debug!("Push({flag:?}, {val_name:?}, {matches:?}, {v:?}",
|
debug!("Push({flag:?}, {val_name:?}, {matches:?}, {v:?}",
|
||||||
flag = flag, val_name = val_name, matches = m, v = v);
|
flag = flag, val_name = val_name, matches = m, v = v);
|
||||||
|
|
||||||
|
if m.is_present(val_name) {
|
||||||
let _ = m
|
let _ = m
|
||||||
.value_of(val_name)
|
.value_of(val_name)
|
||||||
.map(|val| {
|
.map(|val| {
|
||||||
|
debug!("Found '{:?}' = {:?}", val_name, val);
|
||||||
let flag = format!("--{}", flag.unwrap_or(val_name));
|
let flag = format!("--{}", flag.unwrap_or(val_name));
|
||||||
v.insert(0, String::from(val));
|
v.insert(0, String::from(val));
|
||||||
v.insert(0, flag);
|
v.insert(0, flag);
|
||||||
|
})
|
||||||
|
.unwrap_or_else(|| {
|
||||||
|
let flag = format!("--{}", flag.unwrap_or(val_name));
|
||||||
|
v.insert(0, flag);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
push(Some("verbose"),
|
push(Some("verbose"),
|
||||||
|
|
Loading…
Reference in a new issue