From 35287a2d28082847b35b8438fb426f6fe7b8aa8b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 16 Sep 2019 04:02:54 -0400 Subject: [PATCH] fix: force tty check to run with the default language This fixes the case where the system language is non-english. See this stackexchange answer for more details: https://unix.stackexchange.com/q/87745 Closes #3588 --- plugins/common/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common/functions b/plugins/common/functions index 66cf890ae..3b3dd1fc9 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -4,7 +4,7 @@ set -eo pipefail has_tty() { declare desc="return 0 if we have a tty" - if [[ "$(/usr/bin/tty || true)" == "not a tty" ]]; then + if [[ "$(LC_ALL=C /usr/bin/tty || true)" == "not a tty" ]]; then return 1 else return 0