Skip to content

Commit

Permalink
devenv: fix compilation error
Browse files Browse the repository at this point in the history
Bug introduced in #1602.
  • Loading branch information
sandydoo committed Nov 22, 2024
1 parent dec04da commit b77c105
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions devenv/src/devenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ impl Devenv {
std::fs::OpenOptions::new()
.append(true)
.open(&target_path)
.and_then(|mut file| file.write("\n"))
.and_then(|mut file| file.write_all(path.contents()))
.and_then(|mut file| {
file.write_all(b"\n")?;
file.write_all(path.contents())
})
.expect("Failed to append to existing file");
} else {
std::fs::write(&target_path, path.contents()).expect("Failed to write file");
Expand Down

0 comments on commit b77c105

Please sign in to comment.