fix: Handle non-string stdout from execa on Node 24#5
Merged
Conversation
On Node 24, execa may return stdout as a Uint8Array instead of a string. When coerced via template literal this becomes "[object Uint8Array]", causing version parsing to fail with "Cannot parse Dokku server version from output:". Wrap all stdout access in String() to ensure a string regardless of Node version.
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.
On Node 24, execa may return
stdoutas aUint8Arrayinstead of a string. When this gets template-interpolated (e.g. in error messages), it becomes"[object Uint8Array]"instead of the actual output, causing version parsing and other string operations to fail:Wraps all
stdoutaccess inString()inexecDokku()so all downstream callers get a string regardless of Node version.229 tests pass, no behavior change on Node 22.