summaryrefslogtreecommitdiff
path: root/exit.go
diff options
context:
space:
mode:
Diffstat (limited to 'exit.go')
-rw-r--r--exit.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/exit.go b/exit.go
index c35f662..baf6a62 100644
--- a/exit.go
+++ b/exit.go
@@ -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)
}