Skip to content

Commit

Permalink
fix: get terminalWidth in non interactive mode no longer causes a val…
Browse files Browse the repository at this point in the history
…idation exception (#837)
  • Loading branch information
vitalymak authored and bcoe committed Mar 30, 2017
1 parent fde0564 commit 360e301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yargs.js
Expand Up @@ -922,7 +922,7 @@ function Yargs (processArgs, cwd, parentRequire) {

self.terminalWidth = function () {
argsert([], 0)
return process.stdout.columns
return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null
}

Object.defineProperty(self, 'argv', {
Expand Down

0 comments on commit 360e301

Please sign in to comment.