Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getReader().read() only returns the first line #271

Merged
merged 1 commit into from
Jan 13, 2024
Merged

Conversation

jhheider
Copy link
Contributor

closes #270

@jhheider jhheider requested a review from mxcl January 12, 2024 21:58
@mxcl
Copy link
Member

mxcl commented Jan 13, 2024

lol whoops. I swear I printed out the output from the handler and there was lots. So maybe it isn't always the first line?

const read = cmd.stdout.getReader().read().then(x => x.value)

const [out, { success: ok }] = await Promise.all([read, cmd.status])
const { stdout: out, success: ok } = await cmd.output()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the docs imply you should await cmd.status but if it works maybe not then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled that example out of the current docs, I believe. I'll add the reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mxcl mxcl merged commit 4374ac2 into main Jan 13, 2024
33 checks passed
@mxcl mxcl deleted the fix-transformer branch January 13, 2024 01:21
@jhheider
Copy link
Contributor Author

lol whoops. I swear I printed out the output from the handler and there was lots. So maybe it isn't always the first line?

i think sometimes i got 3, so it might be a race condition of some flavor.

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.

transform:
2 participants