summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-05-12 13:08:14 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-05-17 15:17:37 +0200
commit875cbce45c9ca7c646d768884101b0bdd5309606 (patch)
tree74d4135f1fbc5c544e4215cea1a4fd1758e92bfe
parent9b0cf8e75fb7f83f8fe6d4ea07ceb4bd0932d865 (diff)
Fix: Consume all items before failing
This patch changes the download implementation so that one failing download does not fail the whole process, but errors are collected instead and reported after all other downloads are finished. This is the simple case implementation where only one error is reported, though multiple could have happened. Tested-by: Matthias Beyer <matthias.beyer@atos.net> Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> (cherry picked from commit 17a469d3dc1324bcbeba743fe3df3fede0a385f7)
-rw-r--r--src/commands/source.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/source.rs b/src/commands/source.rs
index f29ce84..5c118e5 100644
--- a/src/commands/source.rs
+++ b/src/commands/source.rs
@@ -306,9 +306,9 @@ pub async fn download(
})
.flatten()
.collect::<futures::stream::FuturesUnordered<_>>()
- .collect::<Result<()>>();
+ .collect::<Vec<Result<()>>>();
let multibar_block = tokio::task::spawn_blocking(move || multi.join());
let (r, _) = tokio::join!(r, multibar_block);
- r
+ r.into_iter().collect()
}