mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: ignore stdout in fileIO mode
This commit is contained in:
1 parent
39c5e7661b
commit
6c5a73dae4
2 files changed
+4
-5
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user