-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ToolRunner stdline/errline events buffering (#1055)
* Add tests for stdline and errline * Correctly buffer line data in ToolRunner The _processLineBuffer method is incorrectly buffering line data since the buffer is being passed as a string and thus changes to the buffer preformed in the method are not persisted. The fix is to use an object with a string property as the buffer. * Fix context of emitDoneEvent * Update buffering logic * format code * remove unneded import * Add types * Update tests * Bump version + add changelog * rename buffer variables * Rename test & script file --------- Co-authored-by: Evan Cahill <hacahill@microsoft.com>
- Loading branch information
1 parent
98dccbd
commit a56dfec
Showing
7 changed files
with
125 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const os = require('os'); | ||
|
||
const stdout = process.stdout; | ||
const stderr = process.stderr; | ||
|
||
stdout.write('stdline 1' + os.EOL, | ||
() => stdout.write('stdline 2', | ||
() => stdout.write(os.EOL + 'stdline 3'))); | ||
|
||
stderr.write('errline 1' + os.EOL, | ||
() => stderr.write('errline 2', | ||
() => stderr.write(os.EOL + 'errline 3'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters