Skip to content

Commit

Permalink
Do not stop on error 🛡️
Browse files Browse the repository at this point in the history
cf #48 second request
  • Loading branch information
AdrieanKhisbe committed Jan 2, 2024
1 parent 26f7a6c commit 1cdb3b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const main = async ({argv, stream = process.stdout}) => {
spinner.info(view(stats));
return stats;
},
{concurrency: 1}
{concurrency: 1, stopOnError: false}
).catch(err => {
spinner.stop();
throw err;
Expand Down
12 changes: 8 additions & 4 deletions src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,14 @@ const main = async ({
);
spinner.start();

const statuses = await pMap(packages, async paquage => {
const stats = await fetchPackageStats(paquage).catch(handleError(paquage, true));
return _.defaultsAll([{package: paquage}, stats, predicate(stats)]);
});
const statuses = await pMap(
packages,
async paquage => {
const stats = await fetchPackageStats(paquage).catch(handleError(paquage, true));
return _.defaultsAll([{package: paquage}, stats, predicate(stats)]);
},
{stopOnError: false}
);

const toInstallStats = aggregateStats(statuses);

Expand Down

0 comments on commit 1cdb3b1

Please sign in to comment.