core: 支持修改tags & workspace: upgrade to js-yaml@4

This commit is contained in:
undefined committed 2021-01-09 23:58:06 +08:00
1 parent 87a4bc8bfa
commit 3d9acf2c1a
18 files changed
+38 -36

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ export = async function compile(
lang: string, code: string, target: string, copyIn: any, next?: Function,
): Promise<Execute> {
const LANGS = global.Hydro
? yaml.safeLoad(await global.Hydro.model.system.get('hydrojudge.langs'))
? yaml.load(global.Hydro.model.system.get('hydrojudge.langs'))
: require('./config').LANGS;
if (!LANGS[lang]) throw new SystemError('Unsupported language {0}.', [lang]);
const info = LANGS[lang];