Skip to content

Commit

Permalink
fix(cli): fixed render command writing the source file instead of t…
Browse files Browse the repository at this point in the history
…he rendered data
  • Loading branch information
Taylan Gökkaya committed Mar 22, 2022
1 parent 4deb9fe commit a5aa39f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blog-cli"
version = "0.31.1"
version = "0.31.2"
edition = "2021"

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion cli/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn run_(m: &ArgMatches) -> io::Result<()> {
match m.value_of("out").unwrap() {
"-" => print!("{rendered}"),
file => {
fs::write(file, &input)?;
fs::write(file, rendered.as_bytes())?;
println!("✓ wrote to {file}");
}
}
Expand Down

0 comments on commit a5aa39f

Please sign in to comment.