Skip to content

Conversation

@christophe-duc
Copy link

Problem:

Commands that produce output gradually (e.g., apt update, npm install, build scripts) were failing with exit code 255 because execFileAsync buffers all output until completion. This caused SSH connections to close prematurely due to perceived inactivity.

Changed:

Replace buffered execution with streaming:
Use spawn instead of execFileAsync to consume output in real-time
Add 10MB output size limit with truncation message if exceeded
Return exit code 124 on timeout (standard convention)
Allow users to specify custom timeout via the timeout parameter

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