diff options
| -rw-r--r-- | exit.go | 9 | ||||
| -rw-r--r-- | main.go | 2 |
2 files changed, 5 insertions, 6 deletions
@@ -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) } @@ -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) } |
