Fix sq cert lint.
- If there are no certificate designators, we add one for stdin. - Do this before we inspect the certificate designators.
This commit is contained in:
parent
5cc0115b9c
commit
e9155823e7
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user