judge: fix initial run

This commit is contained in:
undefined committed 2021-01-16 12:46:28 +08:00
1 parent 824ccc935b
commit 0ae8126da6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.2.2",
"version": "2.2.3",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -58,7 +58,7 @@ export const judge = async (ctx) => {
if (filename) copyIn[`${filename}.in`] = { content: ctx.config.input };
const copyOut = filename ? [`${filename}.out`] : [];
const stdin = path.resolve(ctx.tmpdir, '0.in');
await fs.writeFile(stdin, ctx.config.input);
await fs.writeFile(stdin, ctx.config.input || '');
const stdout = path.resolve(ctx.tmpdir, '0.out');
const stderr = path.resolve(ctx.tmpdir, '0.err');
const res = await run(