Skip to content

Commit 85684c3

Browse files
author
Forest Hoffman
committed
Don't throw when child writes to stderr
1 parent b3ea8f5 commit 85684c3

File tree

3 files changed

+1331
-2
lines changed

3 files changed

+1331
-2
lines changed

test/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@
3939
"/logger/"
4040
],
4141
"testRegex": ".*\\.test\\.tsx?"
42+
},
43+
"dependencies": {
44+
"@coder/logger": "^1.1.3"
4245
}
43-
}
46+
}

test/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as path from "path";
44
import * as ps from "ps-list";
55
import * as puppeteer from "puppeteer";
66
import { ChildProcess, exec } from "child_process";
7+
import { logger, field } from "@coder/logger";
78

89
interface IServerOptions {
910
host: string;
@@ -166,7 +167,7 @@ export class TestServer {
166167
this.child.once("error", onError);
167168
if (this.child.stderr) {
168169
this.child.stderr.on("data", async (chunk) => {
169-
await onError(new Error(chunk));
170+
logger.warn("Child wrote to stderr", field("data", chunk));
170171
});
171172
}
172173

0 commit comments

Comments
 (0)