Skip to content

Commit

Permalink
Include path separator in log message (#1749)
Browse files Browse the repository at this point in the history
This adds a path separator between the directory and filenames in the
message printed by `zola serve` to indicate it is listening for changes.

Before:

    Listening for changes in /path/to/dir{config.toml, content, sass, static, templates}

After:

    Listening for changes in /path/to/dir/{config.toml, content, sass, static, templates}
                                         ^
  • Loading branch information
srstevenson authored and Keats committed Feb 14, 2022
1 parent 78b19d7 commit fd0bcfa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cmd/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

use std::fs::{read_dir, remove_dir_all};
use std::net::{SocketAddrV4, TcpListener};
use std::path::{Path, PathBuf};
use std::path::{Path, PathBuf, MAIN_SEPARATOR};
use std::sync::mpsc::channel;
use std::thread;
use std::time::{Duration, Instant};
Expand Down Expand Up @@ -419,7 +419,12 @@ pub fn serve(
broadcaster
};

println!("Listening for changes in {}{{{}}}", root_dir.display(), watchers.join(", "));
println!(
"Listening for changes in {}{}{{{}}}",
root_dir.display(),
MAIN_SEPARATOR,
watchers.join(", ")
);

println!("Press Ctrl+C to stop\n");
// Delete the output folder on ctrl+C
Expand Down

0 comments on commit fd0bcfa

Please sign in to comment.