Skip to content

Commit

Permalink
fix: allow setting COLUMNS env var
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed May 30, 2018
1 parent 1e135a1 commit 961fea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function termwidth(stream: any): number {
return width
}

const columns: number | null = (global as any).columns
const columns: number | null = parseInt(process.env.COLUMNS!, 10) || (global as any).columns

export let stdtermwidth = columns || termwidth(process.stdout)
export let errtermwidth = columns || termwidth(process.stderr)

0 comments on commit 961fea0

Please sign in to comment.