diff options
| -rw-r--r-- | doAdd.go | 6 | ||||
| -rw-r--r-- | doNormal.go | 4 | ||||
| -rw-r--r-- | subCommand.go | 4 |
3 files changed, 10 insertions, 4 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() { 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 { |
