From aec016bb140e47ee41bf4631f02b6df25e9fbe3f Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 7 Sep 2021 07:29:45 +0300 Subject: [PATCH] v.builder: change exit code of `v -check file.v` to 0, when file.v is clean from any errors. --- vlib/v/builder/builder.v | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index bc710646af..fbc2fdc296 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -439,7 +439,10 @@ fn (mut b Builder) print_warnings_and_errors() { } b.show_total_warns_and_errors_stats() - exit(1) + if b.nr_errors > 0 { + exit(1) + } + exit(0) } if b.pref.is_verbose && b.checker.nr_warnings > 1 {