mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix alerts
This commit is contained in:
1 parent
b7f825f0a5
commit
5902b4d4b6
2 files changed
+6
-4
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.5.20",
|
"version": "2.5.21",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -217,9 +217,11 @@ export default async function readCases(folder: string, cfg: Record<string, any>
|
|||||||
throw changeErrorType(e, FormatError);
|
throw changeErrorType(e, FormatError);
|
||||||
}
|
}
|
||||||
let auto = !result.outputs?.length;
|
let auto = !result.outputs?.length;
|
||||||
if (!result.subtasks.length) {
|
if (auto) {
|
||||||
auto = !Math.sum(result.subtasks.map((subtask) => subtask.cases.length));
|
if (result.subtasks.length && !Math.sum(result.subtasks.map((subtask) => subtask.cases.length))) {
|
||||||
} else auto = false;
|
auto = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (auto) {
|
if (auto) {
|
||||||
const c = await readAutoCases(folder, args, config, result);
|
const c = await readAutoCases(folder, args, config, result);
|
||||||
result.subtasks = c.subtasks;
|
result.subtasks = c.subtasks;
|
||||||
|
|||||||
Reference in new issue
Block a user