judge: ignore stdout in fileIO mode

pull/347/head
undefined 3 years ago
parent 39c5e7661b
commit 6c5a73dae4

@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.17.2",
"version": "2.17.3",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",

@ -6,6 +6,7 @@ import { getConfig } from '../config';
import { CompileError, FormatError } from '../error';
import { Logger } from '../log';
import { del, run } from '../sandbox';
import { CmdFile } from '../sandbox/interface';
import signals from '../signals';
import { parseFilename } from '../utils';
import {
@ -56,11 +57,9 @@ function judgeCase(c: Case, sid: string) {
);
const { code, time_usage_ms, memory_usage_kb } = res;
let { status } = res;
let stdout = { fileId: res.fileIds['stdout'] };
let stdout: CmdFile = { fileId: res.fileIds[filename ? 'stdout' : `${filename}.out`] };
const stderr = { fileId: res.fileIds['stderr'] };
if (res.fileIds[`${filename}.out`]) {
stdout = { fileId: res.fileIds[`${filename}.out`] };
}
if (!stdout.fileId) stdout = { content: '' };
let message: any = '';
let score = 0;
if (status === STATUS.STATUS_ACCEPTED) {

Loading…
Cancel
Save