(e61619a) Stage a new ticket through write_then_replace like every other write, and bump to 0.32.11
This commit is contained in:
+4
-4
@@ -344,10 +344,10 @@ pub fn cmd_add(args: &AddArgs, start: &Path) -> Result<()> {
|
||||
// format allows: duplicate titles are supported and `add_allows_duplicate_titles`
|
||||
// pins it. `cmd_campaign_add` deliberately does not carry it either. What is left is
|
||||
// the write's own failure, named with the ticket and the path the way the other
|
||||
// writes in the tree name them.
|
||||
fs::write(&filepath, body).map_err(|e| {
|
||||
anyhow!("Could not write ticket '{}' at {}: {}", title, filepath.display(), e)
|
||||
})?;
|
||||
// writes in the tree name them. Staged like them too: there is no existing content
|
||||
// to corrupt, but a partial file in backlog is a ticket the listing would read, so
|
||||
// the same writer as every edit is the one that makes the new file appear whole.
|
||||
write_then_replace(&worklane_dir, &filepath, &filename, &body, TICKET, title)?;
|
||||
|
||||
println!("Created ticket: {}", filename);
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user