summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfelipe stival <14948182+v0idpwn@users.noreply.github.com>2023-05-17 13:42:17 +0600
committerGitHub <noreply@github.com>2023-05-17 09:42:17 +0200
commit03aa566e2fa5c11c59ce6ca4a6a976fc6c451b01 (patch)
tree926691dd99c179c4215a0f68ffd3f05a0b671633
parentafd4de8ff3a72fa792fc0ef994bfe1da8465652f (diff)
downloadelixir-03aa566e2fa5c11c59ce6ca4a6a976fc6c451b01.tar.gz
Disable ANSI when stdout is not a valid file descriptor (#12565)
Fixes issue reported in https://github.com/elixir-lang/elixir/pull/12564 comments
-rw-r--r--lib/elixir/src/elixir.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/elixir/src/elixir.erl b/lib/elixir/src/elixir.erl
index b2eca2c8c..7f8d5c73d 100644
--- a/lib/elixir/src/elixir.erl
+++ b/lib/elixir/src/elixir.erl
@@ -60,7 +60,7 @@ start(_Type, _Args) ->
{ok, _} -> ok;
undefined ->
%% Remove prim_tty module check as well as checks from scripts on Erlang/OTP 26
- ANSIEnabled = erlang:module_loaded(prim_tty) andalso prim_tty:isatty(stdout),
+ ANSIEnabled = erlang:module_loaded(prim_tty) andalso (prim_tty:isatty(stdout) == true),
application:set_env(elixir, ansi_enabled, ANSIEnabled)
end,