tools: do show the output of c2v, when it fails

master
Delyan Angelov 2022-06-19 17:08:21 +03:00
parent 7b1ade237b
commit 37ef1ee453
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 2 deletions

View File

@ -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)
}