From ca379514141973aed049c73257ce2fe07c6a198f Mon Sep 17 00:00:00 2001 From: ksimuk Date: Tue, 19 Sep 2023 14:28:23 +0100 Subject: [PATCH] For some reason `tun_autograder.sh` is used. fallback to `run_autograder.sh` if `run_autograder` is not found. --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 4e3b120..f9f471c 100644 --- a/main.go +++ b/main.go @@ -209,6 +209,9 @@ func prepareSubmission() { func execute() { log.Println("Copy run_autograde") _, err := copy("/autograder/source/run_autograder", "/autograder/run_autograder") + if (err != nil) && !errors.Is(err, os.ErrNotExist) { + _, err = copy("/autograder/source/run_autograder.sh", "/autograder/run_autograder") + } check(err) os.Chmod("/autograder/run_autograder", 0777)