now return 1 if there were errors

This commit is contained in:
Joshua Mark Manton
2018-05-17 02:08:04 -07:00
parent 703393fc63
commit 1ee4f849cb
+5 -1
View File
@@ -162,7 +162,7 @@ void usage(String argv0) {
print_usage_line(0, "Commands:");
print_usage_line(1, "build compile .odin file as executable");
print_usage_line(1, "run compile and run .odin file");
print_usage_line(1, "check parse and typecheck .odin file");
print_usage_line(1, "check parse and type check .odin file");
print_usage_line(1, "docs generate documentation for a .odin file");
print_usage_line(1, "version print version");
}
@@ -808,6 +808,10 @@ int main(int arg_count, char **arg_ptr) {
show_timings(&checker, &timings);
}
if (global_error_collector.count != 0) {
return 1;
}
return 0;
}