Skip to content

Commit

Permalink
feat(opencollective prompt): set terminal cols to 80
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed Mar 11, 2019
1 parent ea0039a commit badc32d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/opencollective.js
@@ -1,4 +1,3 @@
const child_process = require("child_process");
const chalk = require("chalk");
const fs = require("fs");
const path = require("path");
Expand All @@ -13,7 +12,7 @@ function emoji(emoji) {
}

function print(str = "", color = "dim") {
const terminalCols = process.platform === "win32" ? 80 : parseInt(child_process.execSync("tty -s && tput cols").toString());
const terminalCols = 80;
// eslint-disable-next-line no-control-regex
const ansiEscapeSeq = /\u001b\[[0-9]{1,2}m/g;
const strLength = str.replace(ansiEscapeSeq, "").length;
Expand Down

0 comments on commit badc32d

Please sign in to comment.