From e5fb8f6b1baae74d3aa9b969e12f1320faba2746 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 16 Nov 2024 04:59:21 -0600 Subject: [PATCH] try to blow up before it's an actual problem --- doRelease.go | 8 ++++++++ releaseBox.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doRelease.go b/doRelease.go index 17efc39..b90826d 100644 --- a/doRelease.go +++ b/doRelease.go @@ -27,6 +27,14 @@ func doRelease() bool { return false } + if shell.Exists("go.mod") { + log.Info("go.mod exists ok") + } else { + pwd, _ := os.Getwd() + log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd) + return false + } + curName := me.current.Status.GetCurrentBranchName() mName := me.current.Status.GetMasterBranchName() if curName != mName { diff --git a/releaseBox.go b/releaseBox.go index 8b93d19..72c5c2b 100644 --- a/releaseBox.go +++ b/releaseBox.go @@ -153,7 +153,7 @@ func createReleaseBox(box *gui.Node) { log.Info("maybe ALL DONE?") buttonEnable() worked = true - break + os.Exit(0) } log.Info("doRelease() failed") worked = false