wrapper: Write stdout/stderr data to stream when received #410
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.
Closes #395
Closes #405
This PR restores the equivalent of the wrapper's original behavior to immediately output to STDOUT and STDERR when data is received. I've attached a demo video of the new delayed test.
Context
Prior to #367, we relied on the
@actions/exec
package to immediately write to STDOUT and STDERR (which is the default behavior ofsilent: false
), see the relevant underlying code.Since we can't utilize the
@actions/exec
package's default behavior, due to the debug/command output being passed to the wrapper (actions/toolkit#649), we can just update our original listener to just write the data as it's being buffered. Shout out to @dannystaple for the original thought!Demo
streaming-output.mov