From 77aa472e167c5bd33bf7c0509f44446c9b9f763a Mon Sep 17 00:00:00 2001 From: Dario Petrillo Date: Sun, 15 Oct 2023 23:01:28 +0200 Subject: [PATCH] Generate empty output files when an output is not provided --- task-maker-format/src/ioi/dag/output_generator.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/task-maker-format/src/ioi/dag/output_generator.rs b/task-maker-format/src/ioi/dag/output_generator.rs index e4fa71364..7c33657f0 100644 --- a/task-maker-format/src/ioi/dag/output_generator.rs +++ b/task-maker-format/src/ioi/dag/output_generator.rs @@ -42,7 +42,12 @@ impl OutputGenerator { validation_handle: Option, ) -> Result<(Option, Option), Error> { match self { - OutputGenerator::NotAvailable => Ok((None, None)), + OutputGenerator::NotAvailable => { + let file = File::new("Empty file"); + let uuid = file.uuid; + eval.dag.provide_content(file, vec![]); + Ok((Some(uuid), None)) + } OutputGenerator::StaticFile(path) => { if !path.exists() { bail!("Static output file not found: {:?}", path);