diff options
Diffstat (limited to 'exit.go')
| -rw-r--r-- | exit.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,7 +1,7 @@ package main import ( - "os" + "fmt" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -10,18 +10,17 @@ import ( func okExit(check *gitpb.Repo, msg string) { log.Info("exit() go-mod-clean on", check.Namespace, "ok") log.DaemonMode(true) - log.Info(msg) - os.Exit(0) + me.argv.GoodExit(msg) } func badExit(check *gitpb.Repo, err error) { log.DaemonMode(true) - log.Info("go-mod-clean failed: ", err, forge.Config.ReposDir) if check != nil { if argv.Strict != nil { // if in strict mode, remove the go.mod and go.sum eraseGoMod(check) } } - os.Exit(-1) + s := fmt.Sprintf("failed: %s", me.forge.Config.ReposDir) + me.argv.BadExit(s, err) } |
