1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: only print non-empty diffs (#9803)

This commit is contained in:
Lukas Neubert 2021-04-19 17:55:55 +02:00 committed by GitHub
parent 70c651ff17
commit 4b230d16b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,7 +210,10 @@ fn (foptions &FormatOptions) post_process_file(file string, formatted_file_path
if foptions.is_verbose {
eprintln('Using diff command: $diff_cmd')
}
println(util.color_compare_files(diff_cmd, file, formatted_file_path))
diff := util.color_compare_files(diff_cmd, file, formatted_file_path)
if diff.len > 0 {
println(diff)
}
return
}
if foptions.is_verify {