judge: update vj4 langs file

This commit is contained in:
undefined committed 2025-02-13 02:43:59 +08:00
1 parent 00a07bc288
commit c2a6434dc4
3 files changed
+10 -4

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ import PQueue from 'p-queue';
import superagent from 'superagent';
import WebSocket from 'ws';
import { JudgeResultBody, parseLang, STATUS } from '@hydrooj/common';
import { fs, noop } from '@hydrooj/utils';
import { findFileSync, fs, noop } from '@hydrooj/utils';
import { getConfig } from '../config';
import { FormatError, SystemError } from '../error';
import { Session } from '../interface';
@@ -17,7 +17,7 @@ function removeNixPath(text: string) {
return text.replace(/\/nix\/store\/[a-z0-9]{32}-/g, '/nix/');
}
const langs = parseLang(fs.readFileSync(path.resolve(__dirname, '../../langs.yaml'), 'utf-8'));
const langs = parseLang(fs.readFileSync(process.env.VJ4_LANGS || findFileSync('@hydrooj/hydrojudge/langs.yaml'), 'utf-8'));
export default class VJ4 implements Session {
config: any;