Fix: propagate exit codes from spawned processes#3
Merged
bubkoo merged 1 commit intobubkoo:masterfrom Oct 15, 2025
Merged
Conversation
The run-shared-scripts tool spawned child processes but never waited for them to complete or captured their exit codes, causing all scripts to appear successful even when they failed. This made it impossible for CI systems and build pipelines to detect failures. The run() function now returns a Promise that resolves with the child process exit code, and the bin script awaits this result and sets process.exitCode accordingly. - Modified lib/index.js: wrap spawn in Promise, resolve with exit code - Modified bin/rss.js: await run() and set process.exitCode - Return 0 for successful execution and dry-run mode - Return 1 when script name not found in rss configuration - Added example test scripts to verify exit code propagation Signed-off-by: Eric Wheeler <git-default@z.ewheeler.org>
Contributor
Author
|
OSX failed, but it is unrelated to this PR's changeset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a fundamental bug where run-shared-scripts never propagates exit codes from spawned processes, causing all scripts to appear successful even when they fail.
Previously, the run() function spawned child processes but never waited for them or captured their exit codes. This made it impossible for CI systems and build pipelines to detect failures.
Changes
Test plan
Fixes: #2