add prelude and fix empty gen
This commit is contained in:
@@ -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?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user