From a5aa39fbf3c74c5defacc0cd26bab3be46a56315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20G=C3=B6kkaya?= Date: Wed, 23 Mar 2022 01:00:14 +0300 Subject: [PATCH] fix(cli): fixed `render` command writing the source file instead of the rendered data --- cli/Cargo.toml | 2 +- cli/src/render.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d3b2e0c..faef1c9 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blog-cli" -version = "0.31.1" +version = "0.31.2" edition = "2021" [[bin]] diff --git a/cli/src/render.rs b/cli/src/render.rs index 4bc0379..0a546a4 100644 --- a/cli/src/render.rs +++ b/cli/src/render.rs @@ -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}"); } }