summaryrefslogtreecommitdiff
path: root/doPatch.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-07 00:35:24 -0500
committerJeff Carr <[email protected]>2025-10-07 00:35:24 -0500
commitd448bbc3c9805cffd859c68099e7cba5db8f17ee (patch)
tree58a2d6664066e314308ce0efee7889f7ae840f83 /doPatch.go
parent0a0a766f1123081d29eefae2bf9755f4e17bc5b3 (diff)
might have to reset the pb on fail (?)
Diffstat (limited to 'doPatch.go')
-rw-r--r--doPatch.go8
1 files changed, 6 insertions, 2 deletions
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