From 23711b4d389eabfa35600758f560c77dd6bfb556 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 31 Dec 2024 13:24:27 -0600 Subject: [PATCH] better output --- main.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a75eb4e..e6c599b 100644 --- a/main.go +++ b/main.go @@ -22,17 +22,21 @@ func main() { // load the ~/.config/forge/ config me.forge = forgepb.Init() - me.forge.ConfigPrintTable() + // me.forge.ConfigPrintTable() os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc()) + var alluserbranch bool = true all := me.forge.Repos.SortByFullPath() for all.Scan() { repo := all.Next() if repo.IsUserBranch() { continue } - log.Info("not on user branch:", repo.GetCurrentBranchName(), repo.GetMasterBranchName()) - log.Info("not on user branch:", repo.GetFullPath()) + log.Info("not on user branch:", repo.GetCurrentBranchName(), repo.GetMasterBranchName(), repo.GetFullPath()) + alluserbranch = false + } + + if !alluserbranch { log.Info("you can not continue if repos are not on user branches") os.Exit(-1) }