add prelude and fix empty gen

This commit is contained in:
2025-04-05 11:06:26 +04:00
parent f380513725
commit 613ade1878
5 changed files with 56 additions and 15 deletions

View File

@@ -53,6 +53,10 @@ async fn main() -> Result<()> {
let merged_outputs = generator::file::combine_chunks(outputs)?;
for output in merged_outputs.iter() {
tracing::info!(?output, "Merged file");
let parent = output.path.parent().unwrap();
if !parent.exists() {
fs::create_dir_all(parent).await?;
}
let mut file = fs::File::create(&output.path).await?;
file.write_all(output.content.as_bytes()).await?;
}