Skip to content

fix(core): make watch command work with all and initialRun specified#32282

Merged
jaysoo merged 1 commit intonrwl:masterfrom
omasakun:fix/32281
Feb 26, 2026
Merged

fix(core): make watch command work with all and initialRun specified#32282
jaysoo merged 1 commit intonrwl:masterfrom
omasakun:fix/32281

Conversation

@omasakun
Copy link
Copy Markdown
Contributor

Current Behavior

If you specify both the all and initialRun options when running nx watch, initialRun have no effect.

Expected Behavior

The command should be called once at the beginning even if there are no file changes.

Related Issue(s)

Fixes #32281

@omasakun omasakun requested a review from a team as a code owner August 10, 2025 17:02
@omasakun omasakun requested a review from FrozenPandaz August 10, 2025 17:02
@vercel
Copy link
Copy Markdown

vercel bot commented Aug 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Aug 10, 2025 5:14pm

@omasakun omasakun changed the title fiz(core): make watch command work with all and initialRun specified fix(core): make watch command work with all and initialRun specified Aug 11, 2025
@omasakun
Copy link
Copy Markdown
Contributor Author

omasakun commented Aug 21, 2025

Hi, @FrozenPandaz
Can you review this PR?
Unless this bug is resolved we cannot use nx without a patch on our project.

@github-actions github-actions bot added the stale label Feb 18, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 18, 2026

Deploy Preview for nx-docs canceled.

Name Link
🔨 Latest commit 1dff491
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/699547e874e4d600080183f7

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 18, 2026

Deploy Preview for nx-dev canceled.

Name Link
🔨 Latest commit 1dff491
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/699547e8fbd8900008c220c0

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Feb 18, 2026

View your CI Pipeline Execution ↗ for commit e8808dd

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 51m 12s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 4m 5s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-26 16:43:59 UTC

Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud bot left a comment

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

jaysoo

This comment was marked as outdated.

@jaysoo jaysoo merged commit c364312 into nrwl:master Feb 26, 2026
24 checks passed
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
…32282)

<!-- 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
<!-- This is the behavior we have today -->

If you specify both the `all` and `initialRun` options when running `nx
watch`, `initialRun` have no effect.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

The command should be called once at the beginning even if there are no
file changes.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #32281

(cherry picked from commit c364312)
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
…32282)

<!-- 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
<!-- This is the behavior we have today -->

If you specify both the `all` and `initialRun` options when running `nx
watch`, `initialRun` have no effect.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

The command should be called once at the beginning even if there are no
file changes.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #32281

(cherry picked from commit c364312)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'nx watch --all --initialRun' does not work

3 participants