1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 21:50:00 -05:00

[manual] fix example (#2307)

This commit is contained in:
Vincent LE GOFF 2019-05-09 19:44:39 +02:00 committed by Ryan Dahl
parent d9cdc6788b
commit 07886a03cc

View file

@ -409,10 +409,10 @@ async function main() {
if (code === 0) {
const rawOutput = await p.output();
Deno.stdout.write(rawOutput);
await Deno.stdout.write(rawOutput);
} else {
const rawError = await p.stderrOutput();
const errorString = new TextDecoder().decode(rawError);
const errorString = decoder.decode(rawError);
console.log(errorString);
}