mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 19:58:36 -06:00
Exit when unknown argument is passed
This commit is contained in:
parent
d2c6670901
commit
0b64b0eae6
2 changed files with 2 additions and 1 deletions
|
@ -165,6 +165,7 @@ pub fn process_args(mut args: Vec<String>) -> (Vec<String>, HashMap<&'static str
|
|||
other => {
|
||||
if other.starts_with("-") {
|
||||
eprintln!("Unknown argument passed: {}", other);
|
||||
exit(1);
|
||||
} else {
|
||||
entries.push(arg);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ fn main() {
|
|||
|
||||
if api_key == "" {
|
||||
eprintln!("Error reading the config file. Pass --help to see help.");
|
||||
exit(1);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
// Create TMDb object for API calls
|
||||
|
|
Loading…
Reference in a new issue