Skip to content

Commit

Permalink
fix: windows + wireit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Oct 18, 2024
1 parent 7ad0fec commit e69204b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,10 @@ class Output {
public stream: Stream | WriteStream

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)
this.stream =
(process.platform === 'win32' && process.env.npm_lifecycle_script === 'wireit') || process.env.NODE_ENV === 'test'
? process.stdout
: new Stream(process.env.OCLIF_TABLE_FD ? Number(process.env.OCLIF_TABLE_FD) : process.stdout.fd)
}

public maybePrintLastFrame() {
Expand Down

0 comments on commit e69204b

Please sign in to comment.