File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments