wtfutil/wtf · error

minimumCmd execution failed: %w

Error message

minimumCmd execution failed: %w

What it means

Raised in the progress widget's Refresh when the configured minimumCmd shell command exits with an error or produces no output — the widget cannot determine the minimum value of the progress range, so it records the error and displays it instead of the bar.

Source

Thrown at modules/progress/widget.go:66

		shell: os.Getenv("SHELL"),

		padding: strings.Repeat(" ", settings.padding),
	}

	return &widget
}

/* -------------------- Exported Functions -------------------- */

// Refresh updates the onscreen contents of the widget
func (widget *Widget) Refresh() {
	var err error

	if cmd := widget.settings.minimumCmd; cmd != "" {
		widget.minimum, err = widget.execValueCmd(cmd)
		if err != nil {
			widget.err = fmt.Errorf("minimumCmd execution failed: %w", err)
			widget.display()
			return
		}
	}

	if cmd := widget.settings.maximumCmd; cmd != "" {
		widget.maximum, err = widget.execValueCmd(cmd)
		if err != nil {
			widget.err = fmt.Errorf("maximumCmd execution failed: %w", err)
			widget.display()
			return
		}
	}

	if cmd := widget.settings.currentCmd; cmd != "" {
		widget.current, err = widget.execValueCmd(cmd)
		if err != nil {
			widget.err = fmt.Errorf("currentCmd execution failed: %w", err)

View on GitHub (pinned to bb838c1ccb)

Solutions

  1. Run minimumCmd manually in the configured shell to reproduce the failure
  2. Check the command exists on PATH or use an absolute path
  3. Ensure the command prints a numeric value to stdout and exits 0
  4. Verify the SHELL environment variable is set (the command runs via $SHELL -c)
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at modules/progress/widget.go:66 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of wtfutil/wtf@bb838c1ccb (2026-09-03). Data as JSON: /api/errors/ab4be0b8c3432817. Report an issue: GitHub.