mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix initial run
This commit is contained in:
1 parent
824ccc935b
commit
0ae8126da6
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.2.2",
|
"version": "2.2.3",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export const judge = async (ctx) => {
|
|||||||
if (filename) copyIn[`${filename}.in`] = { content: ctx.config.input };
|
if (filename) copyIn[`${filename}.in`] = { content: ctx.config.input };
|
||||||
const copyOut = filename ? [`${filename}.out`] : [];
|
const copyOut = filename ? [`${filename}.out`] : [];
|
||||||
const stdin = path.resolve(ctx.tmpdir, '0.in');
|
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 stdout = path.resolve(ctx.tmpdir, '0.out');
|
||||||
const stderr = path.resolve(ctx.tmpdir, '0.err');
|
const stderr = path.resolve(ctx.tmpdir, '0.err');
|
||||||
const res = await run(
|
const res = await run(
|
||||||
|
|||||||
Reference in new issue
Block a user