From 315a9c114998ecfa4cb0eb5bba83cbf6199903df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Fri, 6 Oct 2023 18:16:12 +0200 Subject: [PATCH] build: Use more portable colours (#1019) Currently the make command fails because the `bin/sh` shell used does not handle ANSI escape codes for the colour formatting. Instead, we use `$(shell ...)` functions to execute a command that produces the ANSI escape codes. --- Makefile | 6 +++--- requirement-checker/Makefile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index bde05a75c..3b2c6d075 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,9 @@ MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules OS := $(shell uname) -ERROR_COLOR := "\033[41m" -YELLOW_COLOR = "\033[0;33m" -NO_COLOR = "\033[0m" +ERROR_COLOR := $(shell tput setab 1) +YELLOW_COLOR := $(shell tput setaf 3) +NO_COLOR := $(shell tput sgr0) COMPOSER_BIN_PLUGIN_VENDOR = vendor/bamarni/composer-bin-plugin diff --git a/requirement-checker/Makefile b/requirement-checker/Makefile index 85e13176c..e624bd1a8 100644 --- a/requirement-checker/Makefile +++ b/requirement-checker/Makefile @@ -3,9 +3,9 @@ MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules OS := $(shell uname) -ERROR_COLOR := "\033[41m" -YELLOW_COLOR := "\033[0;33m" -NO_COLOR := "\033[0m" +ERROR_COLOR := $(shell tput setab 1) +YELLOW_COLOR := $(shell tput setaf 3) +NO_COLOR := $(shell tput sgr0) PHPUNIT_BIN = vendor/bin/phpunit