Swap error before setting to prevent nil error
Test: go test soong tests Change-Id: Ib6e3519f0f596b3699882fe682e648dd69ed5645
This commit is contained in:
@@ -382,15 +382,15 @@ func loadSoongConfigModuleTypeDefinition(ctx LoadHookContext, from string) map[s
|
||||
defer r.Close()
|
||||
|
||||
mtDef, errs := soongconfig.Parse(r, from)
|
||||
if ctx.Config().BuildMode == Bp2build {
|
||||
ctx.Config().Bp2buildSoongConfigDefinitions.AddVars(*mtDef)
|
||||
}
|
||||
|
||||
if len(errs) > 0 {
|
||||
reportErrors(ctx, from, errs...)
|
||||
return (map[string]blueprint.ModuleFactory)(nil)
|
||||
}
|
||||
|
||||
if ctx.Config().BuildMode == Bp2build {
|
||||
ctx.Config().Bp2buildSoongConfigDefinitions.AddVars(*mtDef)
|
||||
}
|
||||
|
||||
globalModuleTypes := ctx.moduleFactories()
|
||||
|
||||
factories := make(map[string]blueprint.ModuleFactory)
|
||||
|
Reference in New Issue
Block a user