Skip to content

Bun Shell - exit code and await for (const chunk of $.chunks()) #8324

Discussion options

You must be logged in to vote

Is this an okay way to get the exit code while also using one of the helpers, like .text?

I think we should make helpers like .text() and .line() be on the returned ShellOutput so the ShellPromise doesn't have to be awaited again

This code waits forever. Is there a way .lines() could have an overload or some other way so that the above snippet would work and consume the lines as they are printed to the standard output?

Yep, at some point we will allow stdout/stderr to be consumed as ReadableStreams

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@M-Gonzalo
Comment options

Answer selected by TomasHubelbauer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants