1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-04-19 19:56:50 +00:00

Issue #19: Do not allow check listing in combination with file check

This commit is contained in:
Paul-Christian Volkmer 2023-11-08 16:49:23 +01:00
parent 90423b5b4e
commit 349b571e09
2 changed files with 6 additions and 3 deletions

View File

@ -107,12 +107,15 @@ pub enum SubCommand {
strict: bool,
},
#[command(about = "Überprüfe OSC-Datei auf bekannte Problemen")]
#[group(multiple = false)]
Check {
file: String,
#[arg(help = "Die zu prüfende Datei", group = "check-file", required = true)]
file: Option<String>,
#[arg(
short = 'p',
long = "password",
help = "Passwort der OSB-Datei (Optional - für OSB-Dateien)"
help = "Passwort der OSB-Datei (Optional - für OSB-Dateien)",
requires = "check-file"
)]
password: Option<String>,
#[arg(

View File

@ -272,7 +272,7 @@ fn main() -> Result<(), Box<dyn Error>> {
if list {
print_checks();
} else {
let notices = check_file(Path::new(file.as_str()), password);
let notices = check_file(Path::new(file.unwrap_or_default().as_str()), password);
println!(
"Es wurden {} Probleme gefunden\n",
notices