diff --git a/context.go b/context.go index 0e0a38e..ac4fbe6 100644 --- a/context.go +++ b/context.go @@ -718,6 +718,11 @@ func (c *Context) processSubdirs( func (c *Context) createVariations(origModule *moduleInfo, mutatorName string, variationNames []string) ([]*moduleInfo, []error) { + if len(variationNames) == 0 { + panic(fmt.Errorf("mutator %q passed zero-length variation list for module %q", + mutatorName, origModule.properties.Name)) + } + newModules := []*moduleInfo{} var errs []error