Skip to content

Commit

Permalink
Call os.cpus in update-codeowners (DefinitelyTyped#49063)
Browse files Browse the repository at this point in the history
If you don't call it, you get the number of parameters of os.cpus, which
is 0, which parseDefinition treats as a single to return an empty result
instead of parsing.
  • Loading branch information
sandersn authored Oct 23, 2020
1 parent 483a0b3 commit e005d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/update-codeowners.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function main() {

clean();
const dt = await getDefinitelyTyped(options, log);
await parseDefinitions(dt, { nProcesses: os.cpus.length, definitelyTypedPath: "." }, log);
await parseDefinitions(dt, { nProcesses: os.cpus().length, definitelyTypedPath: "." }, log);
const allPackages = await AllPackages.read(dt);
const typings = allPackages.allTypings();
const maxPathLen = Math.max(...typings.map(t => t.subDirectoryPath.length));
Expand Down

0 comments on commit e005d43

Please sign in to comment.