diff options
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() |
