Skip to content

Commit

Permalink
grader: no need to store compilation output if not compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Aug 25, 2024
1 parent 1193a04 commit e784dab
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ public CompilationResult compile(Map<String, File> sourceFiles) throws Compilati
if (result.getStatus() == SandboxExecutionStatus.ZERO_EXIT_CODE) {
File outputFile = sandbox.getFile(COMPILATION_OUTPUT_FILENAME);
try {
String compilationOutput = FileUtils.readFileToString(outputFile, StandardCharsets.UTF_8);
FileUtils.forceDelete(outputFile);
FileUtils.copyFileToDirectory(sandbox.getFile(executableFilename), compilationDir);

return new CompilationResult.Builder()
.isSuccessful(true)
.putOutputs(sourceKey, compilationOutput)
.build();
} catch (IOException e) {
throw new CompilationException(e);
Expand Down

0 comments on commit e784dab

Please sign in to comment.