mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
wsl2: fix: don't pester user for UTF-8 terminal if stdin is not a terminal
This commit is contained in:
@@ -26,6 +26,7 @@ function check_windows_wsl2() {
|
||||
}
|
||||
|
||||
function wsl2_pester_user_for_terminal() {
|
||||
[[ ! -t 0 ]] && return 0 # return 0 if user is not on a terminal
|
||||
[[ "x${SSH_CLIENT}x" != "xx" ]] && return 0 # not if being accessed over SSH
|
||||
[[ "x${WT_SESSION}x" != "xx" ]] && return 0 # WT_SESSION from Windows Terminal # From info in https://stackoverflow.com/questions/59733731/how-to-detect-if-running-in-the-new-windows-terminal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user