We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
zlint
1 parent e74ef5e commit b020fcdCopy full SHA for b020fcd
1 file changed
x509-cert/test-support/src/zlint.rs
@@ -6,7 +6,7 @@ use std::{
6
collections::HashMap,
7
fmt,
8
fs::File,
9
- io::{Read, Write},
+ io::{self, Read, Write},
10
process::{Command, Stdio},
11
};
12
use tempfile::tempdir;
@@ -159,7 +159,13 @@ pub fn check_certificate(pem: &[u8], ignored: &[&str]) {
159
.stderr(Stdio::inherit())
160
.stdout(Stdio::piped())
161
.spawn()
162
- .expect("zlint failed");
+ .unwrap_or_else(|e| match e.kind() {
163
+ io::ErrorKind::NotFound => {
164
+ panic!("error running 'zlint': command not found. Is it installed?")
165
+ }
166
+ _ => panic!("error running 'zlint': {:?}", e),
167
+ });
168
+
169
let mut stdout = child.stdout.take().unwrap();
170
let exit_status = child.wait().expect("get zlint status");
171
0 commit comments