Skip to content

fix(core): run selected projects with --exclude-task-dependencies - #35562

Merged
leosvelperez merged 4 commits into
nrwl:masterfrom
djohnson-aperture:patch-2
Jul 17, 2026
Merged

fix(core): run selected projects with --exclude-task-dependencies#35562
leosvelperez merged 4 commits into
nrwl:masterfrom
djohnson-aperture:patch-2

Conversation

@djohnson-aperture

Copy link
Copy Markdown
Contributor

nx exec --projects @org/taskWithDeps --excludeTaskDependencies -- {command} should still run the command for the passed project even if it's dependent tasks are ignored.

Current Behavior

When nx exec --projects @org/taskWithDeps --excludeTaskDependencies -- echo 1 1 is never echo'd.

Expected Behavior

The command should run for at least the passed in projects, even if their dependencies are ignored.

@djohnson-aperture
djohnson-aperture requested a review from a team as a code owner May 4, 2026 22:46
@djohnson-aperture
djohnson-aperture requested a review from lourw May 4, 2026 22:46
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit eac8b5a

@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit eac8b5a

`nx exec --projects @org/taskWithDeps --excludeTaskDependencies -- {command}` should still run the command for the passed project even if it's dependent tasks are ignored.
@leosvelperez leosvelperez changed the title Return projects as roots if excludeTaskDependencies is true fix(core): run selected projects with --exclude-task-dependencies Jul 17, 2026
@nx-cloud

nx-cloud Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit eac8b5a

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 8m 51s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 5s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 1m 3s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 19s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-17 14:17:12 UTC

nx-cloud[bot]

This comment was marked as outdated.

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nx Cloud has identified a flaky task in your failed CI:

Since the failure was identified as flaky, the solution is to rerun CI. Because this branch comes from a fork, it is not possible for us to push directly, but you can rerun by pushing an empty commit:

git commit --allow-empty -m "chore: trigger rerun"
git push

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@leosvelperez leosvelperez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@leosvelperez
leosvelperez merged commit 8135f11 into nrwl:master Jul 17, 2026
19 of 21 checks passed
FrozenPandaz pushed a commit that referenced this pull request Jul 20, 2026
…5562)

`nx exec --projects @org/taskWithDeps --excludeTaskDependencies --
{command}` should still run the command for the passed project even if
it's dependent tasks are ignored.

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
When `nx exec --projects @org/taskWithDeps --excludeTaskDependencies --
echo 1` 1 is never echo'd.
## Expected Behavior
The command should run for at least the passed in projects, even if
their dependencies are ignored.

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
(cherry picked from commit 8135f11)
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