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,
|
strict: bool,
|
||||||
},
|
},
|
||||||
#[command(about = "Überprüfe OSC-Datei auf bekannte Problemen")]
|
#[command(about = "Überprüfe OSC-Datei auf bekannte Problemen")]
|
||||||
|
#[group(multiple = false)]
|
||||||
Check {
|
Check {
|
||||||
file: String,
|
#[arg(help = "Die zu prüfende Datei", group = "check-file", required = true)]
|
||||||
|
file: Option<String>,
|
||||||
#[arg(
|
#[arg(
|
||||||
short = 'p',
|
short = 'p',
|
||||||
long = "password",
|
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>,
|
password: Option<String>,
|
||||||
#[arg(
|
#[arg(
|
||||||
|
@ -272,7 +272,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
if list {
|
if list {
|
||||||
print_checks();
|
print_checks();
|
||||||
} else {
|
} 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!(
|
println!(
|
||||||
"Es wurden {} Probleme gefunden\n",
|
"Es wurden {} Probleme gefunden\n",
|
||||||
notices
|
notices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user