Do not panic if command line have unreconginzed option.

Return 1 if no command is parsed.
This commit is contained in:
2022-05-24 03:03:36 +00:00
committed by GitHub
parent cccda23664
commit 5ccbfecb89
3 changed files with 4 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ impl Main {
pub fn run(&mut self) -> i32 {
self.cmd = opts::parse_cmd();
if self.cmd.is_none() {
return 0;
return 1;
}
let cmd = self.cmd.as_ref().unwrap();
self.settings = Some(SettingStore::default());