From b029732a11d63ee8bd6e1f7570f51e8f9e578981 Mon Sep 17 00:00:00 2001 From: Rhywden Date: Mon, 21 Nov 2016 20:34:11 +0100 Subject: [PATCH] Fix for console output in PowerShell on Win10 See https://github.com/meteor/meteor/issues/6785 Basically, ``` new Array(249).join('\b') ``` is not a good idea for a carriage return. Code has been tested with CMD, PowerShell and PowerShell in Legacy Mode and seems to solve the issue. --- tools/console/console.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/console/console.js b/tools/console/console.js index 93cff6700f..aa76d70eed 100644 --- a/tools/console/console.js +++ b/tools/console/console.js @@ -68,7 +68,7 @@ var wordwrap = require('wordwrap'); var PROGRESS_DEBUG = !!process.env.METEOR_PROGRESS_DEBUG; var FORCE_PRETTY=undefined; var CARRIAGE_RETURN = - (process.platform === 'win32' && process.stdout.isTTY ? new Array(249).join('\b') : '\r'); + (process.platform === 'win32' && process.stdout.isTTY && process.title !== 'Windows PowerShell' ? new Array(249).join('\b') : '\r'); if (process.env.METEOR_PRETTY_OUTPUT) { FORCE_PRETTY = process.env.METEOR_PRETTY_OUTPUT != '0';