Skip to content

Commit

Permalink
fix: default Stream fd to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Oct 17, 2024
1 parent 6af15c6 commit 93124c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 93124c2

Please sign in to comment.