Terminal: use fallback escape codes if TERM env var is not set

tput requires a value for TERM, so it will generate errors if the var is
not set, as it appears not to be in PhpStorm on macOS.
This commit is contained in:
Dylan K. Taylor 2022-11-24 22:51:20 +00:00
parent a8dca190c6
commit aad9f5fb45
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -166,8 +166,10 @@ abstract class Terminal{
case Utils::OS_LINUX:
case Utils::OS_MACOS:
case Utils::OS_BSD:
self::getEscapeCodes();
return;
if(getenv('TERM') !== false){
self::getEscapeCodes();
return;
}
case Utils::OS_WINDOWS:
case Utils::OS_ANDROID: