Merge "Disallow unknown fields in soong variables file" into main am: 4eef64a70b
am: 142cf7a304
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3114140 Change-Id: I2b5e0f4615f90809a32e1a596dda4c30441dd7d5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
ef9fd50b23
1 changed files with 1 additions and 0 deletions
|
@ -375,6 +375,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