summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-06 21:50:43 -0500
committerJeff Carr <[email protected]>2025-09-06 21:50:43 -0500
commit5c6bbcdbb2938488c37a9e18b713179ee9340ab8 (patch)
treeb8af48e03329083e1385e75062914c7c82d3b474 /main.go
parentf6a79c3be8239e80e39c8992b71b43fdc95d61bb (diff)
cli user interface
Diffstat (limited to 'main.go')
-rw-r--r--main.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/main.go b/main.go
index 7aa68c1..8a8f2c4 100644
--- a/main.go
+++ b/main.go
@@ -140,6 +140,27 @@ func main() {
}
if argv.Normal != nil {
+ if argv.Normal.On != nil {
+ if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL {
+ log.Info("you are already in the normal state")
+ okExit("")
+ }
+ me.forge.Config.Mode = forgepb.ForgeMode_NORMAL
+ me.forge.Config.ConfigSave()
+ log.Info("normal mode on")
+ okExit("")
+ }
+ if argv.Normal.Off != nil {
+ if me.forge.Config.Mode != forgepb.ForgeMode_NORMAL {
+ log.Info("you were aleady not in the normal state")
+ okExit("")
+ }
+ me.forge.Config.Mode = forgepb.ForgeMode_MASTER
+ me.forge.Config.ConfigSave()
+ log.Info("normal mode off")
+ okExit("")
+ }
+
if doNormal() {
log.Infof("all %d repos are on your user branch. It is safe to write code now.\n", me.forge.Repos.Len())
if me.forge.Config.Mode != forgepb.ForgeMode_NORMAL {