vfmt: print worker execution errors with -debug (#9238)

pull/9176/head^2
Lukas Neubert 2021-03-10 19:21:39 +01:00 committed by GitHub
parent c554e0b33d
commit 141a6db16b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -119,6 +119,9 @@ fn main() {
}
worker_result := os.execute(worker_cmd)
if worker_result.exit_code != 0 {
if foptions.is_debug {
eprintln(worker_result.output)
}
errors++
continue
}
@ -126,7 +129,7 @@ fn main() {
if worker_result.exit_code != 0 {
eprintln(worker_result.output)
if worker_result.exit_code == 1 {
eprintln('vfmt error while formatting file: $file .')
eprintln('Internal vfmt error while formatting file: ${file}.')
}
errors++
continue