Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83f107cd authored by Jooyung Han's avatar Jooyung Han Committed by Gerrit Code Review
Browse files

Merge "Check `base` property before using it"

parents 0acb0fb2 5c17ac00
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -223,6 +223,11 @@ var overrideBaseDepTag overrideBaseDependencyTag
// next phase.
func overrideModuleDepsMutator(ctx BottomUpMutatorContext) {
	if module, ok := ctx.Module().(OverrideModule); ok {
		base := String(module.getOverrideModuleProperties().Base)
		if !ctx.OtherModuleExists(base) {
			ctx.PropertyErrorf("base", "%q is not a valid module name", base)
			return
		}
		// See if there's a prebuilt module that overrides this override module with prefer flag,
		// in which case we call SkipInstall on the corresponding variant later.
		ctx.VisitDirectDepsWithTag(PrebuiltDepTag, func(dep Module) {