From f65aba6d27ad991805e1a0227f2c803cba5b2890 Mon Sep 17 00:00:00 2001 From: panda Date: Fri, 18 Nov 2022 09:29:17 +0800 Subject: [PATCH] judge: bug fix (#462) --- .devcontainer/devcontainer.json | 4 ++-- packages/hydrojudge/package.json | 2 +- packages/hydrojudge/src/sandbox.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6c63faf9..f62b3288 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,6 +29,6 @@ // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "root", "features": { - "git": "latest" + "ghcr.io/devcontainers/features/git:1": {} } -} \ No newline at end of file +} diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index eac0f585..74afeb07 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "3.1.6", + "version": "3.1.7", "main": "package.json", "author": "undefined ", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/sandbox.ts b/packages/hydrojudge/src/sandbox.ts index 216e24a5..386fb1a1 100644 --- a/packages/hydrojudge/src/sandbox.ts +++ b/packages/hydrojudge/src/sandbox.ts @@ -84,7 +84,7 @@ function proc(params: Parameter): Cmd { return { args: parseArgs(params.execute || ''), env: [ - ...getConfig('env').split('\n').map((i) => i.trim()).filter((i) => i.startsWith('#')), + ...getConfig('env').split('\n').map((i) => i.trim()).filter((i) => !i.startsWith('#')), ...Object.entries(params.env || {}).map(([k, v]) => `${k}=${v.replace(/=/g, '\\=')}`), ], files: [