Merge "Disallow unknown fields in soong variables file" into main
This commit is contained in:
commit
4eef64a70b
1 changed files with 1 additions and 0 deletions
|
@ -370,6 +370,7 @@ func loadFromConfigFile(configurable *ProductVariables, filename string) error {
|
|||
} else {
|
||||
// Make a decoder for it
|
||||
jsonDecoder := json.NewDecoder(configFileReader)
|
||||
jsonDecoder.DisallowUnknownFields()
|
||||
err = jsonDecoder.Decode(configurable)
|
||||
if err != nil {
|
||||
return fmt.Errorf("config file: %s did not parse correctly: %s", filename, err.Error())
|
||||
|
|
Loading…
Reference in a new issue