From ac4b417385c0c7859674e2ba59e495e9abc5bce4 Mon Sep 17 00:00:00 2001 From: Daniel Imhoff Date: Tue, 10 Dec 2019 11:05:16 -0600 Subject: [PATCH] fix(windows): do not check TERM for windows detection When ssh-ing from Windows to non-Windows, TERM is set in the ssh environment and Windows is incorrectly detected. fixes https://github.com/ionic-team/ionic-cli/issues/4245 --- packages/@ionic/utils-terminal/src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/utils-terminal/src/index.ts b/packages/@ionic/utils-terminal/src/index.ts index ddd425dcdc..e59a80bc1a 100644 --- a/packages/@ionic/utils-terminal/src/index.ts +++ b/packages/@ionic/utils-terminal/src/index.ts @@ -63,9 +63,8 @@ export const TERMINAL_INFO: TerminalInfo = Object.freeze({ ci: CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0, shell: getShell(), tty: Boolean(process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY), - windows: process.platform === 'win32' || ( + windows: process.platform === 'win32' || !!( process.env.OSTYPE && /^(msys|cygwin)$/.test(process.env.OSTYPE) || - process.env.MSYSTEM && /^MINGW(32|64)$/.test(process.env.MSYSTEM) || - process.env.TERM === 'cygwin' + process.env.MSYSTEM && /^MINGW(32|64)$/.test(process.env.MSYSTEM) ), });