judge: bug fix

This commit is contained in:
undefined committed 2025-02-15 20:40:29 +08:00
1 parent 04fcd57f51
commit eaa38c6ba5
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "3.4.3",
"version": "3.4.4",
"main": "./src/index.ts",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -23,7 +23,7 @@ export interface ParsedConfig extends Omit<ProblemConfigFile, 'time' | 'memory'
export { JudgeRequest } from '@hydrooj/common';
export interface Session {
getLang: (name: string) => LangConfig;
getLang: (name: string, doThrow?: boolean) => LangConfig;
getNext: (task: JudgeTask) => NextFunction;
getEnd: (task: JudgeTask) => NextFunction;
fetchFile: <T extends null | string>(namespace: T, files: Record<string, string>) => Promise<T extends null ? string : null>;
+2 -2
View File
@@ -210,11 +210,11 @@ export class JudgeTask {
const s = file.replace('@', '.').split('.');
langId = s.pop();
while (s.length) {
lang = this.session.getLang(langId);
lang = this.session.getLang(langId, false);
if (lang) break;
langId = `${s.pop()}.${langId}`;
}
} else lang = this.session.getLang(langId);
} else lang = this.session.getLang(langId, false);
if (!lang) throw new FormatError(`Unknown ${type} language.`);
// TODO cache compiled binary
const result = await compile(lang, { src: file }, copyIn);