summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-09 19:46:16 -0500
committerJeff Carr <[email protected]>2025-07-09 23:24:06 -0500
commit0d9fe58e57c94856cf1cb9126ba62a86bd78a143 (patch)
treeba7d751da2db7df7c5a62e239feb9334896c7e7c /main.go
parent3d3a07c194e8314accc150b6aea9f70faaae47be (diff)
forged init
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 12 insertions, 1 deletions
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()