8000 Fix to crash on crawl error instead · ixartz/unifiedjs.github.io@2ebfc25 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ebfc25

Browse files
committed
Fix to crash on crawl error instead
1 parent 10d10c1 commit 2ebfc25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crawl/ecosystem.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ main({
6868
},
6969
(error) => {
7070
console.log(chalk.red('✖') + ' error')
71-
console.error(error)
71+
throw error
7272
}
7373
)
7474

@@ -408,7 +408,6 @@ async function getManifest(ctx) {
408408
return {...ctx, proper, manifestBase, packageSource: pkg}
409409
}
410410

411-
/* eslint-disable-next-line complexity */
412411
async function getPackage(ctx) {
413412
var {proper, manifest, manifestBase, project, packageSource} = ctx
414413
var {repo} = project
@@ -422,7 +421,7 @@ async function getPackage(ctx) {
422421
[npmsEndpoint, encodeURIComponent(packageSource.name)].join('/')
423422
).then((x) => x.json())
424423

425-
if (response.code === 'NOT_FOUND' || !response.collected) {
424+
if (response.code === 'NOT_FOUND') {
426425
console.warn('%s#%s: could not find package', repo, manifest)
427426
ctx.proper = false
428427
return

0 commit comments

Comments
 (0)
0