mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
make file loading errors that happen late in compilation still fatal
This commit is contained in:
parent
21d063da26
commit
8f4945f286
9 changed files with 189 additions and 114 deletions
|
@ -730,6 +730,16 @@ pub fn build(
|
|||
Ok(problems.exit_code())
|
||||
}
|
||||
BuildAndRun => {
|
||||
if problems.fatally_errored {
|
||||
problems.print_to_stdout(total_time);
|
||||
println!(
|
||||
".\n\nCannot run program due to fatal error…\n\n\x1B[36m{}\x1B[39m",
|
||||
"─".repeat(80)
|
||||
);
|
||||
|
||||
// Return a nonzero exit code due to falta problem
|
||||
return Ok(problems.exit_code());
|
||||
}
|
||||
if problems.errors > 0 || problems.warnings > 0 {
|
||||
problems.print_to_stdout(total_time);
|
||||
println!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue