From 0d9fe58e57c94856cf1cb9126ba62a86bd78a143 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 9 Jul 2025 19:46:16 -0500 Subject: forged init --- main.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index b9dde90..699f5d8 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "embed" "fmt" "net/http" + "os" "time" "go.wit.com/log" @@ -26,11 +27,21 @@ func main() { if argv.Hostname != "" { HOSTNAME = argv.Hostname } + // the default forged dir is /home/forge + if os.Getenv("FORGE_GOSRC") == "" { + os.Setenv("FORGE_GOSRC", "/home/forge") + } + + if argv.Init != nil { + doInit() + okExit("") + } if argv.List != nil { - doList() + exit(doList()) okExit("") } + // forge = forgepb.Init() if argv.Pull != nil { doPull() -- cgit v1.2.3