From d448bbc3c9805cffd859c68099e7cba5db8f17ee Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 7 Oct 2025 00:35:24 -0500 Subject: might have to reset the pb on fail (?) --- doPatch.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doPatch.go') diff --git a/doPatch.go b/doPatch.go index bf0e3bf..fdde0a0 100644 --- a/doPatch.go +++ b/doPatch.go @@ -109,7 +109,12 @@ func doPatch() error { func doPatchGet(newpb *forgepb.Sets) { curpatches := forgepb.NewPatches() curpatches.Filename = "/tmp/curpatches.pb" - curpatches.Load() + if err := curpatches.Load(); err != nil { + log.Info(err) + // THIS IS NEEDED? NOTSURE + curpatches = forgepb.NewPatches() + curpatches.Filename = "/tmp/curpatches.pb" + } // newpb.PrintTable() for pset := range newpb.IterAll() { if pset.Patches.Len() == 0 { @@ -143,7 +148,6 @@ func doPatchGet(newpb *forgepb.Sets) { curpatches.AppendByPatchId(patch) } } - curpatches.Filename = "/tmp/curpatches.pb" curpatches.Save() curpatches.PrintTable() // me.forge.Patchsets = newpb -- cgit v1.2.3