Skip to content

fix: show error when --tasks flag doesn't match any tasks in build command#10027

Merged
davidfirst merged 2 commits into
masterfrom
fix/build-tasks-validation-error
Oct 3, 2025
Merged

fix: show error when --tasks flag doesn't match any tasks in build command#10027
davidfirst merged 2 commits into
masterfrom
fix/build-tasks-validation-error

Conversation

@davidfirst
Copy link
Copy Markdown
Member

Fixes an issue where bit build --tasks <non-existent-task> would show a misleading success message instead of an error.

Before:

✔ Running build pipeline using 6 environment(s), total 0 tasks. Succeeded in 10s

After:

Pipeline error - no tasks found matching the specified filter: "non-existent-task". Available tasks: BabelCompile, JestTest, teambit.compilation/compiler, teambit.defender/tester, ...

Changes:

  • Added validation in calculatePipelineOrder() to check if task filtering resulted in an empty queue
  • Error message now shows which tasks were requested and lists all available tasks
  • Added e2e test to verify the error is thrown correctly

…mmand

Previously, when running `bit build --tasks <non-existent-task>`, it would show a success message like "Running build pipeline using 6 environment(s), total 0 tasks. Succeeded in 10s" even though no tasks matched the filter.

Now it properly throws an error indicating which tasks were not found and lists all available tasks to help users correct their command.
@davidfirst davidfirst enabled auto-merge (squash) October 3, 2025 21:08
@davidfirst davidfirst merged commit 0042dfb into master Oct 3, 2025
11 checks passed
@davidfirst davidfirst deleted the fix/build-tasks-validation-error branch October 3, 2025 21:23
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.

2 participants