From 96e984244b19cbf28f5f755078a854a5a0e5c330 Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Wed, 4 Jan 2023 19:38:48 +0100 Subject: [PATCH] colored command logs on compilation --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/tasks.rs | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39a505d..9c9e4bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -138,7 +138,7 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "epitls-pi" -version = "1.5.0" +version = "1.5.1" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 21a8b9c..ea4d1b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "epitls-pi" -version = "1.5.0" +version = "1.5.1" edition = "2021" license = "GPL-3.0+" description = "A little helper tool meant to ease the developpment of the C piscine at EPITA/Toulouse." diff --git a/src/tasks.rs b/src/tasks.rs index 3ab3fd1..7bc307a 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -4,6 +4,8 @@ use std::{ process::{exit, Command, ExitStatus, Stdio}, }; +use termion::color; + use crate::utils::{ log_command_run, log_failure, log_separator_bottom, log_separator_top, remove_dupes, tmp_file_path, Apply, @@ -72,6 +74,11 @@ impl CompileTask { log_command_run(&command); log_separator_top(); } + println!( + "{}{command:?}{}", + color::Fg(color::AnsiValue(8)), + color::Fg(color::Reset) + ); let status = command.status().unwrap(); if self.verbose { log_separator_bottom();