Skip to content

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
@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:

3 participants