mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
judge: spj: allow selecting sublanguage
This commit is contained in:
1 parent
fe103d3594
commit
cef1760076
3 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.8.15",
|
||||
"version": "2.8.16",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -29,5 +29,5 @@ export async function compileChecker(getLang: Function, checkerType: string, che
|
||||
if (checkerType === 'testlib') copyIn['testlib.h'] = { src: testlibSrc };
|
||||
const file = await fs.readFile(checker);
|
||||
// TODO cache compiled checker
|
||||
return await compile(getLang(parseFilename(checker).split('.')[1]), file.toString(), 'checker', copyIn);
|
||||
return await compile(getLang(parseFilename(checker).split('.')[1].replace('@', '.'), file.toString(), 'checker', copyIn);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ export const judge = async (ctx) => {
|
||||
copyIn[parseFilename(file)] = { src: file };
|
||||
}
|
||||
return compile(
|
||||
ctx.getLang(parseFilename(ctx.config.interactor).split('.')[1]),
|
||||
ctx.getLang(parseFilename(ctx.config.interactor).split('.')[1].replace('@', '.')),
|
||||
fs.readFileSync(ctx.config.interactor).toString(),
|
||||
'interactor',
|
||||
copyIn,
|
||||
|
||||
Reference in new issue
Block a user