mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-26 20:28: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 => {
|
other => {
|
||||||
if other.starts_with("-") {
|
if other.starts_with("-") {
|
||||||
eprintln!("Unknown argument passed: {}", other);
|
eprintln!("Unknown argument passed: {}", other);
|
||||||
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
entries.push(arg);
|
entries.push(arg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ fn main() {
|
||||||
|
|
||||||
if api_key == "" {
|
if api_key == "" {
|
||||||
eprintln!("Error reading the config file. Pass --help to see help.");
|
eprintln!("Error reading the config file. Pass --help to see help.");
|
||||||
exit(1);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create TMDb object for API calls
|
// Create TMDb object for API calls
|
||||||
|
|
Loading…
Reference in a new issue