`exec` can potentially lose output when using `stdline` and `errline` callbacks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Registering a stdline callback and doing an exec, the callback is never invoked for a command that produces output which does not contains platform newlines.
To Reproduce
I have not narrowed this down to a small test case since this is part of a larger application. It should be possible to reproduce by using the stdline callback with a command that emits output but never generates a newline.
Additional context
I am not a JavaScript developer. This occurred during debugging of an issue where the application produced output, but the stdline callback was never invoked. Part of the issue seemed to be the fact that there were no platform newlines in this output. Reading the toolrunner code, I see some sort of emit calls that look like they are meant to take care of any output that has not been sent to the callbacks, but I cannot find any higher level code that would react to this in exec. I'm also unclear why the callbacks would not be invoked directly for the remaining output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/exec/src/toolrunner.ts around the linked line 525 and trace how output without platform newlines is emitted and passed to stdline and errline callbacks. Reproduce with a command that emits output without a newline, then verify that the remaining output reaches the appropriate callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100