Merge "Disallow unknown fields in soong variables file" into main

This commit is contained in:
Treehugger Robot 2024-06-06 17:51:57 +00:00 committed by Gerrit Code Review
commit 4eef64a70b

View file

@ -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())