summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-27 15:04:03 -0500
committerJeff Carr <[email protected]>2025-10-27 15:04:03 -0500
commit368d9060cb9edc5485b007a2ca247fb822564049 (patch)
tree0fe208869d306d0dde22a65aec83e9c4070d5f7a
parentac81e470cfecaf8387ff621bd36ced28e56ee3fc (diff)
more cache things
-rw-r--r--doAdd.go6
-rw-r--r--doNormal.go4
-rw-r--r--subCommand.go4
3 files changed, 10 insertions, 4 deletions
diff --git a/doAdd.go b/doAdd.go
index 10347a9..2f17e92 100644
--- a/doAdd.go
+++ b/doAdd.go
@@ -9,6 +9,7 @@ import (
"os"
"strings"
+ "go.wit.com/lib/env"
"go.wit.com/lib/fhelp"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
@@ -28,6 +29,11 @@ func doAdd() (string, error) {
var s string
var err error
+ if env.Get("cache") != "auto" {
+ s := fmt.Sprintf("new directories not allowed into (%s) cache", env.Get("cache"))
+ return s, errors.New("you must use the 'auto' or 'all' cache")
+ }
+
wd, _ := os.Getwd()
found := gitpb.NewRepos()
for repo := range me.forge.Repos.IterAll() {
diff --git a/doNormal.go b/doNormal.go
index e8ccd68..a1e2b04 100644
--- a/doNormal.go
+++ b/doNormal.go
@@ -127,8 +127,8 @@ func doNormalStatus() bool {
}
if notnormal.Len() > 0 {
notnormal.SortNamespace()
- footer := me.forge.PrintDefaultTB(notnormal)
- log.Info("not normal repos:" + footer)
+ footer := me.forge.NormalCheckTB(notnormal)
+ log.Info("not normal:" + footer)
return false
}
diff --git a/subCommand.go b/subCommand.go
index 7935d11..ce17401 100644
--- a/subCommand.go
+++ b/subCommand.go
@@ -54,11 +54,11 @@ func doSubcommand() (string, error) {
}
if argv.Add != nil {
- doAdd()
+ s, err = doAdd()
}
if argv.Pull != nil {
- doPull()
+ s, err = doPull()
}
if argv.Show != nil {