Skip to content

Commit d047a07

Browse files
committed
Fix broken file append test by flushing explicitly
1 parent 20ec769 commit d047a07

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/tools/file.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ impl Tool for AppendFile {
317317
if let Err(e) = f.write_all(content.as_bytes()).await {
318318
return ToolResult::error(e.to_string());
319319
}
320+
if let Err(e) = f.flush().await {
321+
return ToolResult::error(e.to_string());
322+
}
320323
ToolResult::ok("appended")
321324
})
322325
}

0 commit comments

Comments
 (0)