{"record":{"id":"e4b86681dd5bee3b","repo":"go-task/task","slug":"task-task-s-is-not-up-to-date","errorCode":null,"errorMessage":"task: Task \"%s\" is not up-to-date","messagePattern":"task: Task \"(.+?)\" is not up-to-date","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"status.go","lineNumber":23,"sourceCode":"\t\"fmt\"\n\n\t\"github.com/go-task/task/v3/taskfile/ast\"\n)\n\n// Status returns an error if any the of given tasks is not up-to-date\nfunc (e *Executor) Status(ctx context.Context, calls ...*Call) error {\n\tfor _, call := range calls {\n\t\tt, err := e.CompiledTask(call)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tisUpToDate, err := e.fingerprinter().UpToDate(ctx, t)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !isUpToDate {\n\t\t\treturn fmt.Errorf(`task: Task \"%s\" is not up-to-date`, t.Name())\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (e *Executor) statusOnError(t *ast.Task) error {\n\treturn e.fingerprinter().OnError(t)\n}\n","sourceCodeStart":5,"sourceCodeEnd":32,"githubUrl":"https://github.com/go-task/task/blob/385e5ad92af02877b6d7cf9dcc963b5ed916e70a/status.go#L5-L32","documentation":"When a task is invoked with `--status` (or status checking is requested), IsUpToDate consults the fingerprinter; if the fingerprinter reports the task is stale, it returns this error instead of a boolean. It tells the caller the task's sources changed (or status checks failed) and the task needs re-running. Note it's returned as an error even though 'not up-to-date' is a normal condition.","triggerScenarios":"Running `task --status <task>` (or code path that requires up-to-date confirmation) where UpToDate returns false because sources/checksum/timestamps changed, or the task's `status:` commands indicate staleness.","commonSituations":"CI pipelines using --status to decide whether to skip a job, generated artifacts missing or regenerated by another process, clock/timestamp changes making the target appear stale, or first run with checksum method and no prior checksum stored.","solutions":["Run the task normally to regenerate outputs, then re-check status","If the stale condition is expected (e.g. first run), run the task once to establish the fingerprint baseline","Verify the `sources:`/`generates:` and `status:` definitions match reality (correct paths, correct check commands)","In scripts, treat this error as a signal to execute the task, not a failure of Task itself"],"exampleFix":"# before\ntask --status build || exit 1\n# after\ntask --status build || task build","handlingStrategy":"try-catch","validationCode":"// check staleness yourself before --status\ndefOut, _ := os.Stat(\"dist/app.bin\")\ndefSrc, _ := os.Stat(\"src/**/*.go\")\nif defOut == nil || defSrc.ModTime().After(defOut.ModTime()) {\n  // task will report not up-to-date; run it first\n  runTask(\"build\")\n}","typeGuard":null,"tryCatchPattern":"err := e.Status(ctx, t)\nif err != nil && strings.Contains(err.Error(), \"is not up-to-date\") {\n  // treat as a cue to run the task, not as a hard failure\n  return t.Run(ctx)\n}","preventionTips":["Run the task at least once to establish checksum/timestamp baselines","Keep sources:/generates:/status: paths accurate and in sync","In CI, treat --status failure as 'needs run' rather than an error"],"tags":["fingerprint","status","up-to-date"],"backgroundTag":"task-not-up-to-date","analyzedSha":"385e5ad92af02877b6d7cf9dcc963b5ed916e70a","analyzedAt":"2026-09-05T09:01:05.226Z","contentChangedAt":"2026-09-05T09:01:05.226Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}