Skip to content

Commit 6ffd2b3

Browse files
committed
checking if stdout/stderr exist before accessing (see tomblind#60)
1 parent 032745d commit 6ffd2b3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

debugger/lldebugger.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ declare const ____exports: unknown;
2828
_G.lldebugger = _G.lldebugger || ____exports;
2929

3030
//Don't buffer io
31-
io.stdout.setvbuf("no");
32-
io.stderr.setvbuf("no");
31+
// eslint-disable-next-line
32+
if (io.stdout) {
33+
io.stdout.setvbuf("no");
34+
}
35+
// eslint-disable-next-line
36+
if (io.stderr) {
37+
io.stderr.setvbuf("no");
38+
}
3339

3440
//Start debugger globally
3541
export function start(breakImmediately?: boolean): void {

0 commit comments

Comments
 (0)