Skip to content

fix: 2 improvements across 2 files - #4175

Open
tomaioo wants to merge 2 commits into
WordPress:trunkfrom
tomaioo:improve/quality/missing-error-handling-for-spawnsync-in-
Open

fix: 2 improvements across 2 files#4175
tomaioo wants to merge 2 commits into
WordPress:trunkfrom
tomaioo:improve/quality/missing-error-handling-for-spawnsync-in-

Conversation

@tomaioo

@tomaioo tomaioo commented Jul 27, 2026

Copy link
Copy Markdown

Summary

fix: 2 improvements across 2 files

Problem

Severity: Medium | File: packages/nx-extensions/src/executors/built-script/executor.ts:L16

The built-script executor uses spawnSync to run a Node.js script but does not check result.error. If the node executable is not found or fails to spawn, result.status will be null (which is not 0), but the actual error is ignored, making debugging difficult.

Solution

Check result.error and throw or log an appropriate error if the spawn fails before checking result.status.

Changes

  • packages/nx-extensions/src/executors/built-script/executor.ts (modified)
  • packages/meta/src/config.ts (modified)

tomaioo added 2 commits July 27, 2026 06:16
- Quality: Missing error handling for spawnSync in built-script executor
- Quality: Typo in configuration value

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Quality: Missing error handling for spawnSync in built-script executor
- Quality: Typo in configuration value

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
@tomaioo
tomaioo requested review from a team, Copilot and mho22 July 27, 2026 13:16

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Improves error visibility in the built-script Nx executor and fixes a typo in meta configuration.

Changes:

  • Throw the underlying spawnSync error when Node fails to spawn in the built-script executor.
  • Correct typo in team name in meta config.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/nx-extensions/src/executors/built-script/executor.ts Adds handling for spawnSync spawn failures via result.error.
packages/meta/src/config.ts Fixes team string typo (“Playgrouns” → “Playground”).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to +21
if (result.error) {
throw result.error;
}
slug: 'wordpress-playground',
name: 'Playground',
team: 'Playgrouns Core',
team: 'Playground Core',
@github-actions github-actions Bot added the [Type] Bug An existing feature does not function as intended label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants