From a97eb38bc586bb9321648f22fade014bc07ba24f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 11 Sep 2025 03:05:16 -0500 Subject: new forge.Init() process --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 2818d1f..1fe56b7 100644 --- a/main.go +++ b/main.go @@ -37,9 +37,14 @@ func main() { } log.Info("go-mod-clean version", VERSION, "built on", BUILDTIME) + // load the ~/.config/forge/ config - // this lets you configure repos you have read/write access too - forge = forgepb.InitPB() // todo: make this scan only if pb file not found + cfg, err := configInit() + if err != nil { + log.Info("This tool requires your repos be scanned by forge first") + badExit(nil, err) + } + forge = forgepb.InitFromConfig(cfg) // figure out what directory we are running in check = findPwdRepo() -- cgit v1.2.3