{"record":{"id":"ab4be0b8c3432817","repo":"wtfutil/wtf","slug":"minimumcmd-execution-failed-w","errorCode":null,"errorMessage":"minimumCmd execution failed: %w","messagePattern":"minimumCmd execution failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/progress/widget.go","lineNumber":66,"sourceCode":"\n\t\tshell: os.Getenv(\"SHELL\"),\n\n\t\tpadding: strings.Repeat(\" \", settings.padding),\n\t}\n\n\treturn &widget\n}\n\n/* -------------------- 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)","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/progress/widget.go#L48-L84","documentation":"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.","triggerScenarios":"Thrown at modules/progress/widget.go:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run minimumCmd 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 (the command runs via $SHELL -c)"],"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"}