Skip to content

Commit

Permalink
fix(windows): do not check TERM for windows detection
Browse files Browse the repository at this point in the history
When ssh-ing from Windows to non-Windows, TERM is set in the ssh
environment and Windows is incorrectly detected.

fixes #4245
  • Loading branch information
imhoffd committed Dec 10, 2019
1 parent f5f1baa commit ac4b417
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/@ionic/utils-terminal/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
});

0 comments on commit ac4b417

Please # to comment.