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

tools: show the exact failing c2v command on v translate failure for easier diagnostic/debugging.

This commit is contained in:
Delyan Angelov 2022-07-21 21:03:59 +03:00
parent 9099594a49
commit 6ebe668a74
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -42,8 +42,10 @@ fn main() {
passed_args := util.args_quote_paths(os.args[2..]) passed_args := util.args_quote_paths(os.args[2..])
// println(passed_args) // println(passed_args)
os.chdir(os.wd_at_startup)? os.chdir(os.wd_at_startup)?
res := os.system('$c2v_bin $passed_args') c2v_cmd := '${os.quoted_path(c2v_bin)} $passed_args'
res := os.system(c2v_cmd)
if res != 0 { if res != 0 {
eprintln('C2V command: $c2v_cmd')
eprintln('C2V failed to translate the C files. Please report it via GitHub.') eprintln('C2V failed to translate the C files. Please report it via GitHub.')
exit(4) exit(4)
} }