summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exit.go9
-rw-r--r--main.go2
2 files changed, 5 insertions, 6 deletions
diff --git a/exit.go b/exit.go
index ce8e80b..b46a5a8 100644
--- a/exit.go
+++ b/exit.go
@@ -9,9 +9,14 @@ import (
"go.wit.com/log"
)
+func (args) Exit() {
+ forgeShutdown()
+}
+
func forgeShutdown() {
gui.UnloadToolkits()
resetTerminalTitle()
+ log.Info("exit got to forgeShutdown()")
if configSave {
me.forge.SetConfigSave(configSave)
}
@@ -21,22 +26,18 @@ func forgeShutdown() {
}
func okExit(thing string) {
- forgeShutdown()
me.sh.GoodExit(thing)
}
func badExit(err error) {
- forgeShutdown()
me.sh.BadExit("forge failed", err)
}
func newBadExit(msg string, err error) {
- forgeShutdown()
me.sh.BadExit(msg, err)
}
func badRepoExit(repo *gitpb.Repo, err error) {
- forgeShutdown()
s := log.Sprintf("%s FAILED: %v", repo.GetNamespace(), err)
me.sh.BadExit(s, err)
}
diff --git a/main.go b/main.go
index a6920c7..a180acb 100644
--- a/main.go
+++ b/main.go
@@ -77,7 +77,6 @@ func main() {
if me.sh.Cmd == "" {
s, err := doDefaultBehavior()
- forgeShutdown()
if err != nil {
me.sh.BadExit(s, err)
}
@@ -155,7 +154,6 @@ func main() {
debug() // sits here forever
}
- forgeShutdown()
if err != nil {
me.sh.BadExit(s, err)
}