File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -160,17 +160,26 @@ mod download {
160160 #[ cfg( all( target_os = "macos" , target_arch = "aarch64" ) ) ]
161161 {
162162 use std:: process:: Command ;
163- let status = Command :: new ( "codesign" )
164- . arg ( "-s ")
165- . arg ( "-" )
166- . arg ( existing_filename. to_str ( ) . unwrap ( ) )
163+
164+ let signing_status = Command :: new ( "codesign ")
165+ . arg ( "-v " )
166+ . arg ( & existing_filename)
167167 . status ( )
168- . with_context ( || "failed to execute codesign" ) ?;
169- if !status. success ( ) {
170- return Err ( anyhow:: anyhow!(
171- "codesign failed with exit code {}" ,
172- status. code( ) . unwrap_or( -1 )
173- ) ) ;
168+ . with_context ( || "failed to verify bitcoind code signature" ) ?;
169+
170+ if !signing_status. success ( ) {
171+ let status = Command :: new ( "codesign" )
172+ . arg ( "-s" )
173+ . arg ( "-" )
174+ . arg ( & existing_filename)
175+ . status ( )
176+ . with_context ( || "failed to sign bitcoind" ) ?;
177+ if !status. success ( ) {
178+ return Err ( anyhow:: anyhow!(
179+ "codesign failed with exit code {}" ,
180+ status. code( ) . unwrap_or( -1 )
181+ ) ) ;
182+ }
174183 }
175184 }
176185 }
You can’t perform that action at this time.
0 commit comments