From 37ef1ee453b5658307f9ab0a5a9064045024a7bd Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 19 Jun 2022 17:08:21 +0300 Subject: [PATCH] tools: do show the output of c2v, when it fails --- cmd/tools/translate.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/tools/translate.v b/cmd/tools/translate.v index 91f8a42370..7e1cca8765 100644 --- a/cmd/tools/translate.v +++ b/cmd/tools/translate.v @@ -25,6 +25,7 @@ fn main() { println('Compiling c2v ...') res2 := os.execute('v -d trace_verbose -g -o c2v -experimental -w .') if res2.exit_code != 0 { + eprintln(res2.output) eprintln('Failed to compile C2V. This should never happen, please report it via GitHub.') exit(2) } @@ -38,9 +39,9 @@ fn main() { os.chdir(os.wd_at_startup)? res := os.execute('$c2v_bin $passed_args') if res.exit_code != 0 { - eprintln('C2V failed to translate this file. This should never happen, please report it via GitHub.') + eprintln(res.output) + eprintln('C2V failed to translate. Please report it via GitHub.') exit(4) } - println('Success!') // println(res.output) }