From 22f823bebe66ea758cf9bb4b72087b167a14d288 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 28 Aug 2025 18:56:27 -0500 Subject: move common patches code to forgepb --- main.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'main.go') 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 { -- cgit v1.2.3