aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/ninja/Ninja.cpp7
1 files changed, 7 insertions, 0 deletions
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<bool> 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> execResult = exec(command.c_str(), true);
if(execResult.isOk())
{