mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 23:37:56 +03:00
chore: cleaner way to check status code
This commit is contained in:
parent
a82b403aa4
commit
fe7e492572
@ -214,14 +214,15 @@ pub fn build_file<'a>(
|
|||||||
|
|
||||||
let total_time = compilation_start.elapsed().unwrap();
|
let total_time = compilation_start.elapsed().unwrap();
|
||||||
|
|
||||||
// TODO change this to report whether there were errors or warnings!
|
|
||||||
let outcome = match &cmd_result {
|
|
||||||
Ok(exit_status) if exit_status.success() => BuildOutcome::NoProblems,
|
|
||||||
_ => BuildOutcome::Errors,
|
|
||||||
};
|
|
||||||
|
|
||||||
// If the cmd errored out, return the Err.
|
// If the cmd errored out, return the Err.
|
||||||
cmd_result?;
|
let exit_status = cmd_result?;
|
||||||
|
|
||||||
|
// TODO change this to report whether there were errors or warnings!
|
||||||
|
let outcome = if exit_status.success() {
|
||||||
|
BuildOutcome::NoProblems
|
||||||
|
} else {
|
||||||
|
BuildOutcome::Errors
|
||||||
|
};
|
||||||
|
|
||||||
Ok(BuiltFile {
|
Ok(BuiltFile {
|
||||||
binary_path,
|
binary_path,
|
||||||
|
Loading…
Reference in New Issue
Block a user