From 50a79c52f3cae6e0a0125b17c723846759806135 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Thu, 26 Apr 2018 10:58:59 +0200 Subject: [PATCH] Fix serve not working with config flag Closes #294 --- CHANGELOG.md | 5 +++++ src/cmd/serve.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da995014..aab2ba8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog + +## 0.4.0 (unreleased) + +- Fix `serve` not working with the config flag + ## 0.3.4 (2018-06-22) - `cargo update` as some dependencies didn't compile with current Rust version diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 67486d69..9a96459f 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -115,8 +115,8 @@ pub fn serve(interface: &str, port: &str, output_dir: &str, base_url: &str, conf .chain_err(|| "Can't watch the `content` folder. Does it exist?")?; watcher.watch("templates/", RecursiveMode::Recursive) .chain_err(|| "Can't watch the `templates` folder. Does it exist?")?; - watcher.watch("config.toml", RecursiveMode::Recursive) - .chain_err(|| "Can't watch the `config.toml` file. Does it exist?")?; + watcher.watch(config_file, RecursiveMode::Recursive) + .chain_err(|| "Can't watch the `config` file. Does it exist?")?; if Path::new("static").exists() { watching_static = true;