judge: enhance readCases

This commit is contained in:
undefined committed 2021-05-07 13:59:19 +08:00
1 parent 34cd4d62e9
commit b7f825f0a5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ export default async function readCases(folder: string, cfg: Record<string, any>
let auto = !result.outputs?.length;
if (!result.subtasks.length) {
auto = !Math.sum(result.subtasks.map((subtask) => subtask.cases.length));
}
} else auto = false;
if (auto) {
const c = await readAutoCases(folder, args, config, result);
result.subtasks = c.subtasks;