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(
54
54
org : & str ,
55
55
repo : & str ,
56
56
artifact : WorkflowListArtifact ,
57
- ) -> Result < bytes:: Bytes > {
57
+ ) -> Result < ( String , bytes:: Bytes ) > {
58
58
println ! ( "downloading artifact {}" , artifact. name) ;
59
59
60
60
let res = client
61
61
. actions ( )
62
62
. download_artifact ( org, repo, artifact. id , ArchiveFormat :: Zip )
63
63
. await ?;
64
64
65
- Ok ( res)
65
+ Ok ( ( artifact . name , res) )
66
66
}
67
67
68
68
enum UploadSource {
@@ -272,9 +272,15 @@ pub async fn command_fetch_release_distributions(args: &ArgMatches) -> Result<()
272
272
let mut install_paths = vec ! [ ] ;
273
273
274
274
while let Some ( res) = buffered. next ( ) . await {
275
- let data = res?;
275
+ let ( name , data) = res?;
276
276
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
+ } ;
278
284
for i in 0 ..za. len ( ) {
279
285
let mut zf = za. by_index ( i) ?;
280
286
You can’t perform that action at this time.
0 commit comments