fix(docker): clean up exec output handling and remove app:list workaround#985
Open
joshtrichards wants to merge 2 commits intonextcloud-libraries:mainfrom
Open
fix(docker): clean up exec output handling and remove app:list workaround#985joshtrichards wants to merge 2 commits intonextcloud-libraries:mainfrom
joshtrichards wants to merge 2 commits intonextcloud-libraries:mainfrom
Conversation
Signed-off-by: Josh <josh.t.richards@gmail.com>
…nExec Signed-off-by: Josh <josh.t.richards@gmail.com>
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.
Resolves #954
This PR refactors Docker exec output handling so stdout and stderr are split at the low-level exec layer, while keeping the higher-level
runExechelper simple for existing callers.Why
runExecpreviously merged stdout and stderr into a single stream. That made command output harder to reason about, and forcedrunOccto work around mixed output when parsing structured responses likeocc app:list --output json.The underlying demux fix has since been accepted upstream and is available in the current dockerode version (which we've since already upgraded to), so we can now separate the streams properly.
What changed
runExecRawhelper that returns{ stdout, stderr }runExecas a thin wrapper that returns stdout onlyverboseis enabledapp:listparsing workaround inrunOccocc app:list --output jsondirectly from clean stdoutCompatibility
This keeps the common
runExec(...): Promise<string>calling pattern intact for existing callers, while making stderr available throughrunExecRawfor cases that need it.The main behavioral change is that
runExecnow returns stdout only, instead of merged stdout/stderr output.