Skip to content
Snippets Groups Projects
Commit c96647f6 authored by Martin Geisler's avatar Martin Geisler
Browse files

PDL: tell ‘diff’ to output a colored diff

This makes it much easier to see the added and removed lines in the
logs. Use ‘less -R’ when viewing a log file to allow the escape
sequences to show up on the terminal.

Test: a provoked error shows a colorful diff: http://screen/bEf5puAqZGVbC5w
Change-Id: I3318015ec563e47be5317298464ef527d1809424
parent 2ea11bdb
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,7 @@ pub fn diff(left: &str, right: &str) -> String {
// We expect `diff` to be available on PATH.
let output = Command::new("diff")
.arg("--unified")
.arg("--color=always")
.arg("--label")
.arg("left")
.arg("--label")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment