diff --git a/src/table.tsx b/src/table.tsx index 292bdbf..8cba978 100644 --- a/src/table.tsx +++ b/src/table.tsx @@ -450,7 +450,8 @@ class Stream extends WriteStream { class Output { public stream: Stream | WriteStream - public constructor(fd = 1) { + public constructor() { + const fd = process.env.OCLIF_TABLE_FD ? Number(process.env.OCLIF_TABLE_FD) : 0 this.stream = process.env.NODE_ENV === 'test' ? process.stdout : new Stream(fd) }