diff --git a/src/commands/cert/lint.rs b/src/commands/cert/lint.rs index 02162889..105cb6c7 100644 --- a/src/commands/cert/lint.rs +++ b/src/commands/cert/lint.rs @@ -230,6 +230,11 @@ pub fn lint(sq: Sq, mut args: Command) -> Result<()> { let reference_time = sq.time; + // If no inputs are given, read from stdin. + if args.certs.is_empty() { + args.certs.designators.push(CertDesignator::Stdin); + } + let mut out = if args.output.is_some() || args.certs.iter().any(|d| d.from_file() || d.from_stdin()) { @@ -250,11 +255,6 @@ pub fn lint(sq: Sq, mut args: Command) -> Result<()> { None }; - // If no inputs are given, read from stdin. - if args.certs.is_empty() { - args.certs.designators.push(CertDesignator::Stdin); - } - { 'next_cert: for cert in sq.resolve_certs_or_fail(&args.certs, 0)? { // Whether we found at least one issue.