on main help sign in
fix: respect disabled indeterminate progress bar setting on app start (#2054)
commitc3ae2306d5d8163d428685a13e71f08212f7e9e6 authorChristian Rocha <christian@rocha.is> dateThu 29 Jan 2026, 19:12 (9 months ago) parent40869ec
1 file changed+9−2
internal/cmd/root.go+9−2
internal/cmd/root.go+9−2
@@ -179,12 +179,19 @@ func supportsProgressBar() bool {
179179}
180180
181181func setupAppWithProgressBar(cmd *cobra.Command) (*app.App, error) {
182− if supportsProgressBar() {
182+ app, err := setupApp(cmd)
183+ if err != nil {
184+ return nil, err
185+ }
186+
187+ // Check if progress bar is enabled in config (defaults to true if nil)
188+ progressEnabled := app.Config().Options.Progress == nil || *app.Config().Options.Progress
189+ if progressEnabled && supportsProgressBar() {
183190 _, _ = fmt.Fprintf(os.Stderr, ansi.SetIndeterminateProgressBar)
184191 defer func() { _, _ = fmt.Fprintf(os.Stderr, ansi.ResetProgressBar) }()
185192 }
186193
187− return setupApp(cmd)
194+ return app, nil
188195}
189196
190197// setupApp handles the common setup logic for both interactive and non-interactive modes.