cargo.eclass: honor NOCOLOR setting
authorGeorgy Yakovlev <gyakovlev@gentoo.org>
Fri, 27 Dec 2019 02:23:41 +0000 (18:23 -0800)
committerGeorgy Yakovlev <gyakovlev@gentoo.org>
Sat, 28 Dec 2019 04:59:11 +0000 (20:59 -0800)
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
eclass/cargo.eclass

index d0288ed2edc902f53abcba54f2db2f7dcd400050..86715b83b88c0a09415833fa78f7cfa9002b4282 100644 (file)
@@ -153,6 +153,8 @@ cargo_gen_config() {
        [term]
        verbose = true
        EOF
+       # honor NOCOLOR setting
+       [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo "color = 'never'" >> "${ECARGO_HOME}/config"
 }
 
 # @FUNCTION: cargo_src_compile