Skip to content
Permalink
Browse files

Set a default cli width of 80 characters

In some environment, `cli-width` is known to return a default value of
`0`, which causes inquirer to crash in such a context.

Fixes: #290
  • Loading branch information...
Juan Cruz Viotti
Juan Cruz Viotti committed Oct 15, 2015
1 parent 1e20379 commit e565c98f81f8dfa814b675a416a89f93b6118c13
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/utils/screen-manager.js
@@ -5,6 +5,8 @@ var readline = require('readline');
var cliWidth = require('cli-width');
var stripAnsi = require('strip-ansi');

// Prevent crashes on environments where the width can't be properly detected
cliWidth.defaultWidth = 80;

var ScreenManager = module.exports = function (rl) {
// These variables are keeping information to allow correct prompt re-rendering

0 comments on commit e565c98

Please sign in to comment.
You can’t perform that action at this time.