docs(run): fix passthrough arg behavior #10167
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updating documentation around pass through args to address #8089.
This has been our behavior since 1.0 and I believe changing it would require a major semver bump.
We pass any pass through args to tasks that match the name of one of the tasks provided to the
turbo run
command. I believe this makes sense as yourtest
tool probably accepts different arguments than yourbuild
tool so ifturbo test -- --coverage=true
passed--coverage=true
to not justjest
, but alsoesbuild
which might error when given that argument. If you did want it to be passed to build you can achieve this by runningturbo build test -- --global-flag
.Testing Instructions
Added a unit test for this behavior.
Also spot checked that this has been the behavior since 1.2.0 (earliest version I can get working without too much work). Tested by running
pnpm turbo run test --filter=@repo/ui -- passthru
1.2.0
1.6.0
2.4.4