summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 13:42:07 -0500
committerJeff Carr <[email protected]>2025-10-15 13:42:07 -0500
commitfec0e3a5636179fcd71fbf2e004e164c753c9725 (patch)
treecf3d28163a3de0a54e31295dfd46678c27a84282 /main.go
parent69c22a94c6c34bdc450cf0a9d29505ed44fd01b7 (diff)
new user note
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/main.go b/main.go
index e5b3e83..274a550 100644
--- a/main.go
+++ b/main.go
@@ -7,7 +7,9 @@ package main
import (
"embed"
+ "fmt"
+ "go.wit.com/lib/fhelp"
"go.wit.com/lib/gui/prep"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
@@ -36,7 +38,17 @@ func main() {
// the current forge init process
me.forge = forgepb.Init() // init forge.pb
- me.forge.ScanRepoDir() // looks for new dirs, checks existing repos for changes
+
+ if !shell.Exists(me.forge.Config.ReposPB) {
+ // very likely new user
+ pfile, _ := resources.ReadFile("resources/NEWUSER")
+ log.Info("NEW USER:", string(pfile))
+ s := fmt.Sprintf("Initialize forge?")
+ if !fhelp.QuestionUser(s) {
+ me.sh.GoodExit("no? porque?")
+ }
+ }
+ me.forge.ScanRepoDir() // looks for new dirs, checks existing repos for changes
if me.forge.Config.Mode != forgepb.ForgeMode_NORMAL {
me.forge.Config.DumpPB()
}