|
|
|
@ -123,8 +123,7 @@ fn run() -> anyhow::Result<()> {
|
|
|
|
|
// Iterate files in /bin.
|
|
|
|
|
let read_dir = std::fs::read_dir("/bin").context("read_dir(/bin) failed")?;
|
|
|
|
|
let errors = read_dir
|
|
|
|
|
.filter_map(|entry| {
|
|
|
|
|
match (|| {
|
|
|
|
|
.map(|entry| {
|
|
|
|
|
let entry = entry.context("read_dir(/bin) failed")?;
|
|
|
|
|
let path = entry.path();
|
|
|
|
|
let status = std::process::Command::new(&path)
|
|
|
|
@ -137,10 +136,10 @@ fn run() -> anyhow::Result<()> {
|
|
|
|
|
} else {
|
|
|
|
|
Err(anyhow::anyhow!("{} failed: {status:?}", path.display()))
|
|
|
|
|
}
|
|
|
|
|
})() {
|
|
|
|
|
})
|
|
|
|
|
.filter_map(|result| match result {
|
|
|
|
|
Ok(()) => None,
|
|
|
|
|
Err(err) => Some(err),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.collect::<Vec<_>>();
|
|
|
|
|
if errors.is_empty() {
|
|
|
|
|