Skip to content

Commit 596eb43

Browse files
committed
expect Buffer data
1 parent fd76367 commit 596eb43

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

eval/dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eval/dist/index.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eval/src/braintrust.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ async function runCommand(command: string, onSummary: OnSummaryFn) {
2121
return new Promise((resolve, reject) => {
2222
const process = spawn(command, { shell: true });
2323

24-
process.stdout?.on("data", (text: string) => {
24+
process.stdout?.on("data", (data: Buffer) => {
2525
onSummary(
26-
text
26+
data
27+
.toString()
2728
.split("\n")
2829
.map(line => line.trim())
2930
.filter(line => line.length > 0)
@@ -46,8 +47,8 @@ async function runCommand(command: string, onSummary: OnSummaryFn) {
4647
);
4748
});
4849

49-
process.stderr?.on("data", data => {
50-
core.info(data); // Outputs the stderr of the command
50+
process.stderr?.on("data", (data: Buffer) => {
51+
core.info(data.toString()); // Outputs the stderr of the command
5152
});
5253

5354
process.on("close", code => {

0 commit comments

Comments
 (0)