Skip to content

Commit

Permalink
Update src/worker.js
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Aboukhalil <robert.aboukhalil@gmail.com>
  • Loading branch information
daniel-ji and robertaboukhalil committed Jul 18, 2023
1 parent 614fb4f commit f0c090e
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,27 +377,18 @@ const aioli = {
},
});
},
printErr: aioli.config.printInterleaved ?
text => {
tool.stdout += `${text}\n`;
if(this.config.printStream)
postMessage({
type: "biowasm",
value: {
stdout: text,
},
});
} :
text => {
tool.stderr += `${text}\n`;
if(this.config.printStream)
printErr: text => {
const destination = aioli.config.printInterleaved ? "stdout" : "stderr";
tool[destination] += `${text}\n`;
if(aioli.config.printStream)
postMessage({
type: "biowasm",
value: {
stderr: text,
[destination]: text,
},
});
}
}
});

// -----------------------------------------------------------------
Expand Down

0 comments on commit f0c090e

Please sign in to comment.