better output

This commit is contained in:
Jeff Carr 2024-12-31 13:24:27 -06:00
parent 05b0ea1ef7
commit 23711b4d38
1 changed files with 7 additions and 3 deletions

10
main.go
View File

@ -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)
}