pretty: ci
This commit is contained in:
parent
7af9d9083a
commit
b5d317b9da
|
@ -14,12 +14,10 @@ const {workspaces} = require(join(FLECKS_CORE_ROOT, 'package.json'));
|
|||
const paths = (await Promise.all(workspaces.map((path) => glob(join(FLECKS_CORE_ROOT, path)))))
|
||||
.flat();
|
||||
const cpus = new Array(require('os').cpus().length).fill(Promise.resolve(0));
|
||||
for (let i = 0; i < paths.length; ++i) {
|
||||
paths.forEach((cwd, i) => {
|
||||
// then= :)
|
||||
cpus[i % cpus.length] = cpus[i % cpus.length]
|
||||
.then(((cwd) => async (code) => (
|
||||
(await processCode(spawnWith(args, {cwd}))) || code
|
||||
))(paths[i]));
|
||||
}
|
||||
.then(async (code) => (await processCode(spawnWith(args, {cwd}))) || code);
|
||||
});
|
||||
process.exitCode = (await Promise.all(cpus)).find((code) => code !== 0) || 0;
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue
Block a user