File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,22 @@ async fn fetch_artifact(
5454 org : & str ,
5555 repo : & str ,
5656 artifact : WorkflowListArtifact ,
57- ) -> Result < bytes:: Bytes > {
57+ ) -> Option < bytes:: Bytes > {
5858 println ! ( "downloading artifact {}" , artifact. name) ;
5959
60- let res = client
60+ let res = match client
6161 . actions ( )
6262 . download_artifact ( org, repo, artifact. id , ArchiveFormat :: Zip )
63- . await ?;
63+ . await
64+ {
65+ Ok ( res) => res,
66+ Err ( err) => {
67+ println ! ( "failed to download artifact {}: {}" , artifact. name, err) ;
68+ return None ;
69+ }
70+ } ;
6471
65- Ok ( res)
72+ Some ( res)
6673}
6774
6875enum UploadSource {
@@ -272,7 +279,7 @@ pub async fn command_fetch_release_distributions(args: &ArgMatches) -> Result<()
272279 let mut install_paths = vec ! [ ] ;
273280
274281 while let Some ( res) = buffered. next ( ) . await {
275- let data = res? ;
282+ let Some ( data) = res else { continue } ;
276283
277284 let mut za = ZipArchive :: new ( std:: io:: Cursor :: new ( data) ) ?;
278285 for i in 0 ..za. len ( ) {
You can’t perform that action at this time.
0 commit comments