From bf2527a301d6048816958f92129289258ba5991d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 14 Jan 2018 18:47:05 +0100 Subject: Use 'script' to get colored output for ninja build --- backend/ninja/Ninja.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 0ca7c7a..06345d9 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -973,9 +973,16 @@ namespace backend Result Ninja::compile(const _tinydir_char_t *buildFilePath) { + // TODO: Verify `script` is installed. We need `script` to get colored output +#if OS_FAMILY == OS_FAMILY_POSIX + FileString command = TINYDIR_STRING("script -eqc 'ninja -C \""); + command += buildFilePath; + command += TINYDIR_STRING("\"' /dev/null"); +#else FileString command = TINYDIR_STRING("ninja -C \""); command += buildFilePath; command += TINYDIR_STRING("\""); +#endif Result execResult = exec(command.c_str(), true); if(execResult.isOk()) { -- cgit v1.2.3