Skip to content

Commit

Permalink
tool: exit gracefully if system arg is missng
Browse files Browse the repository at this point in the history
Previously this resulted in a panic with Option::unwrap() on a None

Signed-off-by: julia <[email protected]>
  • Loading branch information
midnightveil committed Sep 2, 2024
1 parent 057c83d commit a9f6537
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tool/microkit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3130,6 +3130,9 @@ impl<'a> Args<'a> {
if config.is_none() {
missing_args.push("--config");
}
if system.is_none() {
missing_args.push("system");
}

if !missing_args.is_empty() {
print_usage(available_boards);
Expand Down

0 comments on commit a9f6537

Please sign in to comment.