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:
parent
90423b5b4e
commit
349b571e09
@ -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(
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user