summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-28 18:56:27 -0500
committerJeff Carr <[email protected]>2025-08-28 19:30:59 -0500
commit22f823bebe66ea758cf9bb4b72087b167a14d288 (patch)
tree8fd156cadaf49115b806bfb1144a3b6a534300e3 /main.go
parent250fa7de4a714c0457a4eda6d0c4c4b88b6c0821 (diff)
move common patches code to forgepb
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/main.go b/main.go
index c74409b..734d257 100644
--- a/main.go
+++ b/main.go
@@ -48,12 +48,14 @@ func main() {
os.Setenv("FORGE_GOSRC", "/home/forge")
}
- if err := LoadPatchsets(); err != nil {
- if argv.Force == true {
- me.all = forgepb.NewPatchsets()
- } else {
- badExit(err)
- }
+ if os.Getenv("FORGE_PATCHDIR") == "" {
+ os.Setenv("FORGE_PATCHDIR", "/var/lib/forged")
+ }
+
+ me.forge = forgepb.RawInitPB()
+
+ if err := me.forge.LoadPatchsets(); err != nil {
+ badExit(err)
}
if argv.List != nil {