From 7eabee9f4041974643db809b35c70e8095ab3087 Mon Sep 17 00:00:00 2001 From: Tom Parker Date: Tue, 18 Oct 2016 22:36:12 +0100 Subject: [PATCH] Initial command run is outside the loop! --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9a861fd..e30e4a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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);