From 20a85b6fa78ed1b86cb5cef70de5aa7949d1d67d Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 26 Feb 2018 23:00:52 +0100 Subject: [PATCH] nix: fix test with ANSI escape characters The nix commands print the error: commands in red, the ANSI reset caused one of the tests to fail. --- ofborg/src/nix.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ofborg/src/nix.rs b/ofborg/src/nix.rs index 207320a..8fc5421 100644 --- a/ofborg/src/nix.rs +++ b/ofborg/src/nix.rs @@ -261,6 +261,7 @@ mod tests { let buildlog = lines .into_iter() + .map(|line| line.replace("\u{1b}[0m", "")) // ANSI reset .map(|line| format!(" | {}", line)) .collect::>() .join("\n");