summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doPatch.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/doPatch.go b/doPatch.go
index f221538..763f14b 100644
--- a/doPatch.go
+++ b/doPatch.go
@@ -13,6 +13,7 @@ import (
"regexp"
"strings"
+ "go.wit.com/lib/config"
"go.wit.com/lib/env"
"go.wit.com/lib/fhelp"
"go.wit.com/lib/protobuf/forgepb"
@@ -42,16 +43,9 @@ func doPatch() (string, error) {
if me.curpatches.Filename == "" {
panic("config failed. no 'curpatches' set in ~/.config/forge/config.text")
}
- if err := me.curpatches.Load(); err != nil {
- me.curpatches.Save()
- me.curpatches.Save()
- log.Info(err)
+ if err := config.LoadCacheDir(me.curpatches); err != nil {
+ log.Info("tried to load curpatches from:", me.curpatches.Filename)
panic("no file")
- // return
- // // THIS IS NEEDED? NOTSURE
- me.curpatches = forgepb.NewPatches()
- me.curpatches.Filename = env.Get("curpatches")
- me.curpatches.Save()
}
// just show the table and exit