From 389b43b61864c13061af398e0f6bd7fc1b59dca8 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Thu, 2 Mar 2023 12:32:21 +0100 Subject: [PATCH] Don't enable color if TERM=dumb (#1342) --- src/alr/alr-commands.adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/alr/alr-commands.adb b/src/alr/alr-commands.adb index ac1eb1bb..72ba10e7 100644 --- a/src/alr/alr-commands.adb +++ b/src/alr/alr-commands.adb @@ -1,6 +1,7 @@ with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Command_Line; with Ada.Directories; +with Ada.Environment_Variables; with Ada.Text_IO; use Ada.Text_IO; with CLIC.TTY; @@ -461,6 +462,7 @@ package body Alr.Commands is if Alire.Platforms.Current.Operating_System /= Alire.Platforms.Windows and then not No_Color and then not No_TTY + and then Ada.Environment_Variables.Value ("TERM", "dumb") /= "dumb" then CLIC.TTY.Enable_Color (Force => False); -- This may still not enable color if TTY is detected to be incapable -- 2.39.5