Skip to content

Commit

Permalink
Generate empty output files when an output is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
dp1 committed Oct 16, 2023
1 parent 2518d2e commit 77aa472
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion task-maker-format/src/ioi/dag/output_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ impl OutputGenerator {
validation_handle: Option<FileUuid>,
) -> Result<(Option<FileUuid>, Option<Execution>), 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);
Expand Down

0 comments on commit 77aa472

Please sign in to comment.