Skip to content

Commit 0627ed9

Browse files
committed
remove incorrect checking of duplicate params as it doesn't consider default param values
1 parent 383658a commit 0627ed9

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

dsc_lib/src/configure/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,6 @@ impl Configurator {
550550
info!("Set parameter '{name}' to '{value}'");
551551
}
552552

553-
if self.context.parameters.contains_key(&name) {
554-
return Err(DscError::Validation(format!("Parameter '{name}' defined more than once")));
555-
}
556-
557553
self.context.parameters.insert(name.clone(), (value.clone(), constraint.parameter_type.clone()));
558554
// also update the configuration with the parameter value
559555
if let Some(parameters) = &mut self.config.parameters {
@@ -583,10 +579,6 @@ impl Configurator {
583579
value.clone()
584580
};
585581
info!("Set variable '{name}' to '{new_value}'");
586-
if self.context.variables.contains_key(name) {
587-
return Err(DscError::Validation(format!("Variable '{name}' defined mnore than once")));
588-
}
589-
590582
self.context.variables.insert(name.to_string(), new_value);
591583
}
592584
Ok(())

0 commit comments

Comments
 (0)