Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/salty-kiwis-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cmake-rn": patch
---

Pretty print spawn errors instead of simply rethrowing to commander.
9 changes: 8 additions & 1 deletion packages/cmake-rn/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,16 @@ program = program.action(
}
} catch (error) {
if (error instanceof SpawnFailure) {
process.exitCode = 1;
error.flushOutput("both");
if (baseOptions.verbose) {
console.error(
`\nFailed running: ${chalk.dim(error.command, ...error.args)}\n`,
);
}
} else {
throw error;
Copy link

Choose a reason for hiding this comment

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

Bug: Error Masking Causes Build Failures

SpawnFailure errors are no longer re-thrown, allowing execution to continue normally after a critical subprocess failure. This creates an inconsistent state where process.exitCode is set to 1, but the function resolves successfully, potentially masking build failures and leading to unexpected control flow.

Fix in Cursor Fix in Web

}
throw error;
}
},
);
Expand Down
Loading