summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-10 08:05:50 -0500
committerJeff Carr <[email protected]>2025-10-10 08:05:50 -0500
commit85d29ad6835b83f5bd52eb6be316569aeefae71b (patch)
tree14a01821d2ca3e95e38d27274973b01ea9f1bcb5 /main.go
parentcf253dc0fed3d0950e1ef41811ab88cd4167b913 (diff)
lots of fixes to the overall behavior
Diffstat (limited to 'main.go')
-rw-r--r--main.go29
1 files changed, 2 insertions, 27 deletions
diff --git a/main.go b/main.go
index 9541b95..cd008af 100644
--- a/main.go
+++ b/main.go
@@ -77,6 +77,7 @@ func main() {
if me.sh.Cmd == "" {
s, err := doDefaultBehavior()
+ forgeShutdown()
if err != nil {
me.sh.BadExit(s, err)
}
@@ -154,35 +155,9 @@ func main() {
debug() // sits here forever
}
+ forgeShutdown()
if err != nil {
me.sh.BadExit(s, err)
}
me.sh.GoodExit(s)
}
-
-func doDefaultBehavior() (string, error) {
- // DEFAULT BEHAVIOR CHANGES BETWEEN MODES
- if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL || me.forge.Config.Mode == forgepb.ForgeMode_USER {
- // PROBABLY YOU ARE WRITING CODE
- // got to the end with nothing to do (?)
- if showWorkRepos() {
- // found some repos at least
- }
- // every repo is in a really clean state. no extra files anywhere
- // no dirty repos, no repos that need to be published
- // nothing different between user and master branch version. not common
- s := "All of your git repositories appear to be in perfect shape"
- return s, nil
- }
-
- if me.forge.Config.Mode == forgepb.ForgeMode_MASTER {
- // PROBABLY YOU ARE PUBLISHING / MERGING CODE
- defaultBehaviorMaster()
- return "default master behavior", nil
- }
-
- // PROBABLY A NEW USER
- found := findAll()
- footer := me.forge.PrintDefaultTB(found)
- return footer, nil
-}