From 9ae7d95335e10c69484b3323f2e793755b3c712b Mon Sep 17 00:00:00 2001 From: Jeff Foley Date: Sat, 10 Feb 2024 22:36:44 -0500 Subject: [PATCH] finished progress bar upon completion --- cmd/amass/enum.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/amass/enum.go b/cmd/amass/enum.go index 7888eea05..8a0d28727 100644 --- a/cmd/amass/enum.go +++ b/cmd/amass/enum.go @@ -190,8 +190,8 @@ func runEnumCommand(clArgs []string) { } } - progress := pb.Start64(int64(count)) done := make(chan struct{}) + progress := pb.Start64(int64(count)) go func() { var finished int t := time.NewTicker(2 * time.Second) @@ -207,6 +207,7 @@ func runEnumCommand(clArgs []string) { finished++ if finished == 5 { close(done) + return } } else { finished = 0 @@ -219,7 +220,6 @@ func runEnumCommand(clArgs []string) { } } }() - // Terminate client session loop: for { select { @@ -229,7 +229,7 @@ loop: close(done) } } - fmt.Fprintf(color.Error, "\n%s\n", green("The enumeration has finished")) + progress.Finish() } func argsAndConfig(clArgs []string) (*config.Config, *enumArgs) {