mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: handle empty output file (fix #1186)
This commit is contained in:
1 file changed
+1
-1
@@ -137,7 +137,7 @@ function adaptResult(result: SandboxResult, params: Parameter): SandboxAdaptedRe
|
||||
ret.files = result.files || {};
|
||||
ret.fileIds = result.fileIds || {};
|
||||
if (ret.fileIds[outname]) ret.fileIds.stdout = ret.fileIds[outname];
|
||||
if (params.filename && !ret.fileIds[outname] && !ret.files[outname]) {
|
||||
if (params.filename && !ret.fileIds[outname] && typeof ret.files[outname] !== 'string') {
|
||||
result.error = 'Output file not found';
|
||||
ret.status = STATUS.STATUS_RUNTIME_ERROR;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user