judge: check checker path

This commit is contained in:
undefined committed 2022-02-10 14:56:53 +08:00
1 parent f8f4d82c0a
commit d52e2b3802
3 files changed
+5 -1

No files matched your search

+3
View File
@@ -195,6 +195,9 @@ function isValidConfig(config) {
}
const memMax = max(config.subtasks.map((subtask) => subtask.memory));
if (memMax > parseMemoryMB(getConfig('memoryMax'))) throw new FormatError('Memory limit larger than memory_max');
if (['default', 'strict'].includes(config.checker_type || 'default') && !config.checker) {
throw new FormatError('You did not specify a checker.');
}
}
export default async function readCases(folder: string, cfg: Record<string, any> = {}, args) {