From 2bbc498b02cbbe3ba68de391bffbe79ab0f226fc Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 19 Oct 2025 05:08:00 -0500 Subject: new argv --- exit.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'exit.go') 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) } -- cgit v1.2.3