Skip to content

Commit 01b5dbb

Browse files
committed
Let the terminal Drop code run, fixes #22
1 parent 374168b commit 01b5dbb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/run.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,19 @@ pub fn run<'a>(command_line: Option<Vec<&str>>, console: &mut dyn ConsoleEmulato
8585
.arg(Arg::with_name("disk_p").long("disk-p").value_name("path").help("directory to map disk P:"));
8686

8787
let matches = match command_line {
88-
None => app.get_matches(),
88+
None => app.get_matches_safe(),
8989
Some(args) => {
9090
let mut args_complete = vec!("testbin");
9191
args_complete.extend(args.iter());
92-
app.get_matches_from(args_complete)
92+
app.get_matches_from_safe(args_complete)
93+
}
94+
};
95+
96+
let matches = match matches {
97+
Ok(m) => m,
98+
Err(e) => {
99+
eprint!("{}", e);
100+
return;
93101
}
94102
};
95103

0 commit comments

Comments
 (0)