Skip to content

fix: Honor --output-logs errors-only for non-cached tasks#11926

Open
veeceey wants to merge 2 commits intovercel:mainfrom
veeceey:fix/issue-6677-output-logs-errors-only
Open

fix: Honor --output-logs errors-only for non-cached tasks#11926
veeceey wants to merge 2 commits intovercel:mainfrom
veeceey:fix/issue-6677-output-logs-errors-only

Conversation

@veeceey
Copy link

@veeceey veeceey commented Feb 20, 2026

Summary

Fixes #6677--output-logs errors-only was ignored for tasks with cache: false.

When caching is disabled, the log file was not created, so on_error had no log file to replay when a task failed. Since errors-only mode works by suppressing stdout during execution and replaying the log file on error, the missing log file meant error output was silently lost.

The fix adds an additional condition in TaskCache::output_writer(): the log file is also created when task_output_logs == OutputLogsMode::ErrorsOnly, ensuring the replay-on-error mechanism works for non-cached tasks.

Test plan

  • Added integration test errors-only-no-cache.t verifying:
    • Successful non-cached task with --output-logs=errors-only suppresses output
    • Failed non-cached task with --output-logs=errors-only shows output

@veeceey veeceey requested a review from a team as a code owner February 20, 2026 08:42
@veeceey veeceey requested review from tknickman and removed request for a team February 20, 2026 08:42
@vercel
Copy link
Contributor

vercel bot commented Feb 20, 2026

Someone is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

When a task has `cache: false`, the log file was not being created,
which meant `--output-logs errors-only` had no log file to replay on
error. This change ensures the log file is always written when the
output mode is `errors-only`, regardless of the cache setting, so that
failed task output is properly shown.

Closes vercel#6677
@veeceey veeceey force-pushed the fix/issue-6677-output-logs-errors-only branch from 84a336f to d3ecc6e Compare February 20, 2026 08:42
@veeceey veeceey changed the title fix(run-cache): honor --output-logs errors-only for non-cached tasks fix: honor --output-logs errors-only for non-cached tasks Feb 20, 2026
@veeceey veeceey changed the title fix: honor --output-logs errors-only for non-cached tasks fix: Honor --output-logs errors-only for non-cached tasks Feb 23, 2026
@veeceey
Copy link
Author

veeceey commented Feb 23, 2026

updated the PR title to capitalize the first letter after the prefix — should fix the title validation check now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[turborepo] The --output-logs errors-only flag is ignored for non-cached tasks.

1 participant