{"record":{"id":"fa1c9b214af62e72","repo":"wtfutil/wtf","slug":"maximumcmd-execution-failed-w","errorCode":null,"errorMessage":"maximumCmd execution failed: %w","messagePattern":"maximumCmd execution failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/progress/widget.go","lineNumber":75,"sourceCode":"/* -------------------- Exported Functions -------------------- */\n\n// Refresh updates the onscreen contents of the widget\nfunc (widget *Widget) Refresh() {\n\tvar err error\n\n\tif cmd := widget.settings.minimumCmd; cmd != \"\" {\n\t\twidget.minimum, err = widget.execValueCmd(cmd)\n\t\tif err != nil {\n\t\t\twidget.err = fmt.Errorf(\"minimumCmd execution failed: %w\", err)\n\t\t\twidget.display()\n\t\t\treturn\n\t\t}\n\t}\n\n\tif cmd := widget.settings.maximumCmd; cmd != \"\" {\n\t\twidget.maximum, err = widget.execValueCmd(cmd)\n\t\tif err != nil {\n\t\t\twidget.err = fmt.Errorf(\"maximumCmd execution failed: %w\", err)\n\t\t\twidget.display()\n\t\t\treturn\n\t\t}\n\t}\n\n\tif cmd := widget.settings.currentCmd; cmd != \"\" {\n\t\twidget.current, err = widget.execValueCmd(cmd)\n\t\tif err != nil {\n\t\t\twidget.err = fmt.Errorf(\"currentCmd execution failed: %w\", err)\n\t\t\twidget.display()\n\t\t\treturn\n\t\t}\n\t}\n\n\twidget.calcPercent()\n\n\twidget.display()\n}","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/progress/widget.go#L57-L93","documentation":"Raised in the progress widget's Refresh when the configured maximumCmd shell command fails (non-zero exit, not found, or no output) — the widget cannot determine the maximum value of the progress range and stores the error for display.","triggerScenarios":"Thrown at modules/progress/widget.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run maximumCmd manually in the configured shell to reproduce the failure","Check the command exists on PATH or use an absolute path","Ensure the command prints a numeric value to stdout and exits 0","Verify the SHELL environment variable is set"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bb838c1ccb0f0f3223690df44afdec663d622881","analyzedAt":"2026-09-03T17:02:45.030Z","contentChangedAt":"2026-09-03T17:02:45.030Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}