summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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