unjs / std-env

Runtime Agnostic JS utils
MIT License
433 stars 25 forks source link

feat: improve hasTTY detection #96

Closed NamesMT closed 7 months ago

NamesMT commented 7 months ago

Context: WSL2 Alpine with zsh

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

I'm using WSL2 Alpine zsh, hasTTY isn't detected so things like isColorSupported is false. From my stdout dump there's a flag: _type='tty' that could be used.

๐Ÿ“ Checklist

NamesMT commented 7 months ago

Need some re-checking

NamesMT commented 7 months ago

Yup, written this too quickly without actually testing, a new tested and double-checked PR has been created: https://github.com/unjs/std-env/pull/97