Skip to content

Commit

Permalink
fix worker stdout comparsion
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalmishraa committed Sep 5, 2024
1 parent 5bf8eea commit 6d39d28
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/worker-compiler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ async function runCommand(command: string, code: string, language: string, expec
});
return;
}

if (stderr) {
resolve({
stderr: `Stderr: ${stderr}`,
Expand All @@ -218,7 +219,11 @@ async function runCommand(command: string, code: string, language: string, expec
});
return;
}
if (expected_output + '\n' !== stdout) {

stdout = stdout.trimEnd();


if (expected_output !== stdout) {
console.log(`expected_output: ${expected_output}, stdout: ${stdout}`);

resolve({
Expand Down

0 comments on commit 6d39d28

Please sign in to comment.