Skip to content

Commit

Permalink
feat(cli): Catch missing required arguments at parse time
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Nov 4, 2024
1 parent fea5b42 commit 0baa9d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clap::Parser;
use clap::{Parser, ValueHint};
use std::path::PathBuf;

/// The SILE Typesetter reads input file(s) and typesets the content into a rendered document
Expand Down Expand Up @@ -85,7 +85,7 @@ pub struct Cli {
/// An extension will be chosen based on the output backend, typically .pdf.
/// With this option any arbitrary name and path can be given.
/// Additionally `-` can be used to write the output to STDOUT.
#[clap(short, long, value_name = "FILE")]
#[clap(short, long, value_name = "FILE", required_if_eq("input", "-"))]
pub output: Option<PathBuf>,

/// Set or override document class options.
Expand Down

0 comments on commit 0baa9d6

Please sign in to comment.