Skip to content

Commit 985ca75

Browse files
iximeowflihp
authored andcommitted
verifier: humility isn't a tempfile
1 parent ff9f27a commit 985ca75

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

verifier/src/hiffy.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ pub enum AttestHiffyError {
6767
Serialize(#[from] hubpack::Error),
6868
#[error("Failed to do something w/ a tempfile: {0}")]
6969
TempFile(#[from] std::io::Error),
70+
// Failure to run `humility` yields a `std::io::Error` from
71+
// `std::process::Command`, but it is distinctly *not* related to a tempfile
72+
// in any way. Give this failure mode a more distinctive form.
73+
#[error("Failed to run humility: {0}")]
74+
Humility(std::io::Error),
7075
}
7176

7277
/// A type to simplify the execution of the HIF operations exposed by the RoT
@@ -126,7 +131,7 @@ impl AttestHiffy {
126131
cmd.arg(format!("--arguments={a}"));
127132
}
128133

129-
let output = cmd.output()?;
134+
let output = cmd.output().map_err(AttestHiffyError::Humility)?;
130135
Self::u32_from_cmd_output(output)
131136
}
132137

0 commit comments

Comments
 (0)