Skip to content

Commit

Permalink
fix(plugins/languages): fix empty repository infinite loop (#840) [sk…
Browse files Browse the repository at this point in the history
…ip ci]
  • Loading branch information
lowlighter authored Feb 4, 2022
1 parent cc855ad commit 850dce9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/plugins/languages/analyzers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr
const per_page = 1
const edited = new Set()
console.debug(`metrics/compute/${login}/plugins > languages > indepth > checking git log`)
try {
await imports.run("git log --max-count=1", {cwd:path})
}
catch {
console.debug(`metrics/compute/${login}/plugins > languages > indepth > repo seems empty or impossible to git log, skipping`)
return
}
for (let page = 0; ; page++) {
try {
console.debug(`metrics/compute/${login}/plugins > languages > indepth > processing commits ${page * per_page} from ${(page + 1) * per_page}`)
Expand Down

0 comments on commit 850dce9

Please sign in to comment.