mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
judge: redirect cpp to cc
This commit is contained in:
1 parent
f5226f154a
commit
c577165790
5 files changed
+5
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.12.13",
|
||||
"version": "2.12.14",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -235,6 +235,7 @@ export default class Hydro {
|
||||
|
||||
getLang(name: string) {
|
||||
if (this.language[name]) return this.language[name];
|
||||
if (name === 'cpp' && this.language.cc) return this.language.cc;
|
||||
throw new SystemError('Unsupported language {0}', [name]);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ async function postInit() {
|
||||
|
||||
function getLang(lang: string) {
|
||||
if (setting.langs[lang]) return setting.langs[lang];
|
||||
if (lang === 'cpp' && setting.langs['cc']) return setting.langs['cc'];
|
||||
throw new SystemError('Unsupported language {0}.', [lang]);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export default async function readYamlCases(cfg: Record<string, any> = {}, check
|
||||
config.checker_type = cfg.checker_type || 'default';
|
||||
if (cfg.checker) {
|
||||
if (!cfg.checker.includes('.')) {
|
||||
config.checker = findFileSync(`@hydrooj/hydrojudgejudge/vendor/testlib/checkers/${cfg.checker}.cpp`, false);
|
||||
config.checker = findFileSync(`@hydrooj/hydrojudge/vendor/testlib/checkers/${cfg.checker}.cpp`, false);
|
||||
}
|
||||
if (!config.checker) config.checker = checkFile(cfg.checker, 'Cannot find checker {0}.');
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.1.9",
|
||||
"version": "1.1.10",
|
||||
"description": "hydrooj utils",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user