Initial command run is outside the loop!

This commit is contained in:
Tom Parker 2016-10-18 22:36:12 +01:00
parent 6887552aab
commit 7eabee9f40
1 changed files with 4 additions and 3 deletions

View File

@ -155,10 +155,11 @@ fn main() {
let cmd = cmd_parts.join(" ");
let mut runner = Runner::new(args.is_present("restart"), args.is_present("clear"));
if args.is_present("run-initially") {
runner.run_command(&cmd);
}
loop {
if args.is_present("run-initially") {
runner.run_command(&cmd);
}
let e = wait(&rx, &filter).expect("error when waiting for filesystem changes");
debug!("{:?}: {:?}", e.op, e.path);