diff options
| author | Jeff Carr <[email protected]> | 2024-12-15 17:03:51 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-15 17:03:51 -0600 |
| commit | 8e9408bac890dd6a09ebb5a7fed752fa9a35a73e (patch) | |
| tree | 0bd307372dc4ac8b842a5f441343141e7cc5d12d /main.go | |
| parent | 24ddb803f3e6509f55c6ef4a033175f4fd00f26d (diff) | |
don't os.exit anymore as oftenv0.23.0
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2,6 +2,8 @@ package main import ( "embed" + "errors" + "fmt" "os" "path/filepath" "strings" @@ -35,8 +37,7 @@ func main() { me.releaseReasonS = os.Getenv("GUIRELEASE_REASON") if me.releaseReasonS == "" { - log.Info("shell ENV GUIRELEASE_REASON not set") - os.Exit(0) + badExit(errors.New("shell ENV GUIRELEASE_REASON not set")) } // unset the go development ENV var to generate release files @@ -62,8 +63,7 @@ func main() { homeDir, _ := os.UserHomeDir() gowork := filepath.Join(homeDir, "go/src/go.work") if shell.Exists(gowork) { - log.Info("go.work must be deleted") - os.Exit(0) + badExit(errors.New("go.work must be deleted")) } log.Info("Creating the Release Window") @@ -118,8 +118,8 @@ func main() { me.startRepo = me.forge.Repos.FindByGoPath(basedir) if me.startRepo == nil { - log.Info("Can not run if pwd is not a repo", basedir) - os.Exit(0) + msg := fmt.Sprint("Can not run if pwd is not a repo", basedir) + badExit(errors.New(msg)) } me.Enable() |
