diff --git a/lib/modder/modder_load.go b/lib/modder/modder_load.go index 05e573c..97a9e10 100644 --- a/lib/modder/modder_load.go +++ b/lib/modder/modder_load.go @@ -1,6 +1,8 @@ package modder import ( + "fmt" + "github.com/go-git/go-billy/v5/osfs" ) @@ -116,6 +118,11 @@ func (mdr *Modder) LoadModFile() error { return err } + // no file + if m.ModFile == nil { + return fmt.Errorf("no %q file found, directory not initialized for %s", mdr.ModFile, mdr.Name) + } + m.Module = m.ModFile.Module.Mod.Path return nil