diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index cdf1d78e3a..2cc241ac30 100644 --- a/eclass/nim-utils.eclass +++ b/eclass/nim-utils.eclass @@ -104,6 +104,18 @@ nim_get_buildtype() { fi } +# @FUNCTION: nim_get_colors +# @USAGE: +# @RETURN: "off" if colors should be disabled, "on" otherwise +nim_get_colors() { + debug-print-function ${FUNCNAME} "${@}" + + case ${NOCOLOR} in + true|yes) echo "off" ;; + *) echo "on" ;; + esac +} + # @FUNCTION: nim_gen_config # @USAGE: [