Skip to content

fix: catch and log spawnSync execution errors - #110

Open
Piyush0049 wants to merge 1 commit into
docker:mainfrom
Piyush0049:fix-spawn-sync-errors
Open

fix: catch and log spawnSync execution errors#110
Piyush0049 wants to merge 1 commit into
docker:mainfrom
Piyush0049:fix-spawn-sync-errors

Conversation

@Piyush0049

Copy link
Copy Markdown

What's Changed

This PR fixes a silent failure bug where OS-level execution errors are swallowed without any logs.

When executing the Docker Scout binary using childProcess.spawnSync, the process can fail to spawn entirely (for example, due to an ENOENT if the file is somehow missing, or an EACCES if there is a permission/execution blocker on the runner). When this happens, result.status is null and the actual OS error is placed in result.error.

Currently, the action only checks result.status and blindly exits with code 1 if it isn't a number. This leaves developers with a crashed action and absolutely zero logs explaining why it failed to start.

This change simply checks for result.error and explicitly logs it using core.setFailed() before exiting, drastically improving debuggability when runner issues occur.

Validation

I've successfully built the project locally and tested the compilation via @rollup.

@Piyush0049
Piyush0049 requested a review from cdupuis as a code owner July 4, 2026 13:18
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.

1 participant