File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,15 @@ async fn fetch_artifact(
5454 org : & str ,
5555 repo : & str ,
5656 artifact : WorkflowListArtifact ,
57- ) -> Result < bytes:: Bytes > {
57+ ) -> Result < ( String , bytes:: Bytes ) > {
5858 println ! ( "downloading artifact {}" , artifact. name) ;
5959
6060 let res = client
6161 . actions ( )
6262 . download_artifact ( org, repo, artifact. id , ArchiveFormat :: Zip )
6363 . await ?;
6464
65- Ok ( res)
65+ Ok ( ( artifact . name , res) )
6666}
6767
6868enum UploadSource {
@@ -272,9 +272,15 @@ pub async fn command_fetch_release_distributions(args: &ArgMatches) -> Result<()
272272 let mut install_paths = vec ! [ ] ;
273273
274274 while let Some ( res) = buffered. next ( ) . await {
275- let data = res?;
275+ let ( name , data) = res?;
276276
277- let mut za = ZipArchive :: new ( std:: io:: Cursor :: new ( data) ) ?;
277+ let mut za = match ZipArchive :: new ( std:: io:: Cursor :: new ( data) ) {
278+ Ok ( za) => za,
279+ Err ( err) => {
280+ eprintln ! ( "failed to read zip archive {name}: {err}" ) ;
281+ continue ;
282+ }
283+ } ;
278284 for i in 0 ..za. len ( ) {
279285 let mut zf = za. by_index ( i) ?;
280286
You can’t perform that action at this time.
0 commit comments