We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was trying to print a few logs but the last one was a warning, after the warning the function finished but the progress bar didn't print.
func installingPseudoList() { var pseudoProgramList = strings.Split("pseudo-excel pseudo-photoshop pseudo-chrome pseudo-outlook pseudo-explorer "+ "pseudo-dops pseudo-git pseudo-vsc pseudo-intellij pseudo-asd pseudo-scoop pseudo-minecraft", " ") pterm.DefaultSection.Println("Installing pseudo programs") p, _ := pterm.DefaultProgressbar.WithTotal(len(pseudoProgramList)).WithTitle("Installing stuff").Start() for i := 0; i < p.Total; i++ { p.UpdateTitle("Installing " + pseudoProgramList[i]) if pseudoProgramList[i] == "pseudo-minecraft" { pterm.Warning.Println("Could not install pseudo-minecraft\nThe company policy forbids games.") } else { pterm.Success.Println("Installing " + pseudoProgramList[i]) p.Increment() } time.Sleep(time.Second / 2) } p.Stop() }
If you run this function, since Minecraft is the last, the last log will be a warning which will lead to the progress bar not to print
The text was updated successfully, but these errors were encountered:
Hi, thanks for the report! I'll take a look at this soon :)
Sorry, something went wrong.
Branch issue-302-Progress_bar_doesnt_print_if_the_last_message_is_not_a_success created!
fix(progressbar): refresh progressbars on every PTerm print (#302)
e60aa9c
Hi @Vano2903, fixed! This will be in the release today :) Thanks for reporting!
MarvinJWendt
Successfully merging a pull request may close this issue.
I was trying to print a few logs but the last one was a warning, after the warning the function finished but the progress bar didn't print.
If you run this function, since Minecraft is the last, the last log will be a warning which will lead to the progress bar not to print
The text was updated successfully, but these errors were encountered: