Skip to content

Commit

Permalink
Exit with code 1 if any error messages come up for CI purposes (#14)
Browse files Browse the repository at this point in the history
* Exit with code 1 if any error messages come up for CI purposes

* run cargo fmt

* Take lpg's suggestion

Co-Authored-By: Lucien Greathouse <[email protected]>

* cargo fmt

* switch to if let

Co-authored-by: Lucien Greathouse <[email protected]>
  • Loading branch information
noahwillcrow and LPGhatguy authored Apr 9, 2020
1 parent 9699de8 commit ba61630
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,19 @@ fn main() {
_ => bad_path(input),
};

let mut exit_code = 0;

while let Some(message) = messages.recv().expect("Problem receiving message") {
if let RobloxMessage::Output {
level: OutputLevel::Error,
..
} = message
{
exit_code = 1;
}

print_message(&message);
}

process::exit(exit_code);
}

0 comments on commit ba61630

Please sign in to comment.