icepick workflow: fix handling aliases in JSON inputs
This commit is contained in:
parent
f8f33a72ed
commit
adf1e68006
|
@ -124,15 +124,20 @@ fn load_inputs<'a>(
|
||||||
.and_then(|f| serde_json::from_reader(f).ok());
|
.and_then(|f| serde_json::from_reader(f).ok());
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let identifier = &input.name;
|
let identifier = &input.name;
|
||||||
match matches.get_one::<String>(&input.name) {
|
match matches.get_one::<String>(identifier) {
|
||||||
Some(value) => {
|
Some(value) => {
|
||||||
map.insert(identifier.clone(), value.clone());
|
map.insert(identifier.clone(), value.clone());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
if let Some(value) = input_file.as_ref().and_then(|f| f.get(identifier)) {
|
for aliasable_identifier in input.identifiers() {
|
||||||
map.insert(identifier.clone(), value.clone());
|
if let Some(value) = input_file
|
||||||
continue;
|
.as_ref()
|
||||||
|
.and_then(|f| f.get(aliasable_identifier))
|
||||||
|
{
|
||||||
|
map.insert(identifier.clone(), value.clone());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue