diff options
Diffstat (limited to 'doAdd.go')
| -rw-r--r-- | doAdd.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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() { |
