From 6168a4d3a285016a34756b14fc2a7485df85dd0e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 14 Jan 2022 15:18:40 +0200 Subject: [PATCH] tools: improve diagnostic info for `v vgret -v `. --- cmd/tools/vgret.v | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/tools/vgret.v b/cmd/tools/vgret.v index 50c254f397..9d8f9bdf98 100644 --- a/cmd/tools/vgret.v +++ b/cmd/tools/vgret.v @@ -241,14 +241,18 @@ fn compare_screenshots(opt Options, output_path string, target_path string) ? { diff_file := os.join_path(os.temp_dir(), os.file_name(src).all_before_last('.') + '.diff.tif') flags := app_config.compare.flags.join(' ') - diff_cmd := '$idiff_exe $flags -od -o "$diff_file" -abs "$src" "$target"' - result := os.execute(diff_cmd) - if opt.verbose && result.exit_code == 0 { + diff_cmd := '$idiff_exe $flags -abs -od -o "$diff_file" -abs "$src" "$target"' + if opt.verbose { eprintln('Running: $diff_cmd') - eprintln('$result.output') + } + + result := os.execute(diff_cmd) + + if opt.verbose && result.exit_code == 0 { + eprintln('OUTPUT: \n$result.output') } if result.exit_code != 0 { - eprintln('$result.output') + eprintln('OUTPUT: \n$result.output') if result.exit_code == 1 { warns[src] = target } else {