[m-rev.] diff: disable colored diagnostics in the Windows console
Julien Fischer
jfischer at opturion.com
Wed Dec 31 16:36:19 AEDT 2025
Support for ANSI escape sequences and how / when it is enabled in the
Windows console is the typical Microsoft mess. Turning off colored
diagnostics by default is the lowest common denominator approach that at least
gets us readable error messages.
----------------------------
Disable colored diagnostics in the Windows console.
The Windows console (on Windows 10 at least) does not support ANSI escape
sequences by default, so turn off colored diagnostics by default when
the compiler is invoked via the mercury.bat batch file.
scripts/mercury.bat.in:
As above.
Julien.
diff --git a/scripts/mercury.bat.in b/scripts/mercury.bat.in
index bfa51373a..2ef100b89 100644
--- a/scripts/mercury.bat.in
+++ b/scripts/mercury.bat.in
@@ -25,5 +25,6 @@ set "MERCURY_CONFIG_DIR=@CONFIG_LIBDIR@"
set "MERCURY_COMPILER=@PREFIX@\bin\mercury_compile"
set "MERCURY_HOST_ENV_TYPE=windows"
set "MERCURY_TARGET_ENV_TYPE=windows"
+set "MERCURY_ENABLE_COLOR=never"
%MERCURY_COMPILER% %*
More information about the reviews
mailing list