summaryrefslogtreecommitdiff
path: root/doAdd.go
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 /doAdd.go
parentac81e470cfecaf8387ff621bd36ced28e56ee3fc (diff)
more cache things
Diffstat (limited to 'doAdd.go')
-rw-r--r--doAdd.go6
1 files changed, 6 insertions, 0 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() {