1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: detect termux more reliably

This commit is contained in:
Delyan Angelov
2022-07-01 13:52:57 +03:00
parent b6b611aa82
commit 69d292e8d1
2 changed files with 4 additions and 4 deletions

View File

@ -317,9 +317,6 @@ pub fn get_raw_lines_joined() string {
// user_os returns current user operating system name.
pub fn user_os() string {
$if linux {
if getenv('TERMUX_VERSION') != '' {
return 'termux'
}
return 'linux'
}
$if macos {
@ -358,6 +355,9 @@ pub fn user_os() string {
$if vinix {
return 'vinix'
}
if getenv('TERMUX_VERSION') != '' {
return 'termux'
}
return 'unknown'
}