From d3361049f3b9f129f39630bf634ad4493b5f3cf1 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Thu, 14 Jan 2021 18:46:21 -0600 Subject: [PATCH 1/2] move run up --- api/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/main.go b/api/main.go index 1fb17e5..29aaa0c 100644 --- a/api/main.go +++ b/api/main.go @@ -162,6 +162,8 @@ func launch(request Inbound, res http.ResponseWriter) { separate: &stderr, } + err := cmd.Run() + stdout = strings.TrimSpace(stdout) stderr = strings.TrimSpace(stderr) combined = strings.TrimSpace(combined) @@ -178,8 +180,6 @@ func launch(request Inbound, res http.ResponseWriter) { combined = combined[:65536] } - err := cmd.Run() - // get the executing version of the language execlang := request.Language From b2b69db27dbf60efaa69d947b710ea9caad92207 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Fri, 15 Jan 2021 11:29:57 -0600 Subject: [PATCH 2/2] remove path separators for java executor --- lxc/executors/java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc/executors/java b/lxc/executors/java index 0318a9f..6fc09e0 100755 --- a/lxc/executors/java +++ b/lxc/executors/java @@ -1,6 +1,6 @@ cd /tmp/$2 cp code.code interim.java -name=$(grep -Po "(?<=\n|\A)\s*(public\s+)?(class|interface)\s+\K([^\n\s{]+)" interim.java) +name=$(grep -Po "(?<=\n|\A)\s*(public\s+)?(class|interface)\s+\K([^\/\\\n\s{]+)" interim.java) mv interim.java $name.java runuser runner$1 -c "\