From 56604cd472bb66947838d8c412111b4324334a86 Mon Sep 17 00:00:00 2001 From: Tony Worm Date: Sat, 18 Apr 2020 00:22:57 -0600 Subject: [PATCH] un-shortcut sum/map files; fix bug in sumfile writing for local replaces --- lib/modder/modder_load.go | 6 ++++-- lib/modder/modder_write.go | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/modder/modder_load.go b/lib/modder/modder_load.go index e5d420a..05e573c 100644 --- a/lib/modder/modder_load.go +++ b/lib/modder/modder_load.go @@ -93,12 +93,14 @@ func (mdr *Modder) LoadMetaFromFS(dir string) error { err = mdr.LoadSumFile() if err != nil { - return err + mdr.errors = append(mdr.errors, err) + return nil } err = mdr.LoadMappingsFile() if err != nil { - return err + mdr.errors = append(mdr.errors, err) + return nil } return nil diff --git a/lib/modder/modder_write.go b/lib/modder/modder_write.go index 85d652e..56c38a7 100644 --- a/lib/modder/modder_write.go +++ b/lib/modder/modder_write.go @@ -40,6 +40,11 @@ func (mdr *Modder) WriteVendor() error { // write out each dep for _, m := range mdr.depsMap { + // XXX, this only (?) happens with local replaces with no matching require entry + if m.Version == "" { + m.Version = "v0.0.0" + } + dirhash, err := util.BillyCalcHash(m.FS) if err != nil { mdr.errors = append(mdr.errors, err)