From 3891dc0aef0edf15a54f2961257887b7d736cd2e Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Wed, 27 Jan 2016 12:16:02 +0000 Subject: [PATCH] read initial state from watchfile, should fix #17 Signed-off-by: Justin Cormack --- alpine/packages/hupper/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alpine/packages/hupper/main.go b/alpine/packages/hupper/main.go index b1395f93c..ff5304729 100644 --- a/alpine/packages/hupper/main.go +++ b/alpine/packages/hupper/main.go @@ -36,6 +36,11 @@ func main() { } // 43 bytes is the record size of the watch buf := make([]byte, 43) + // initial state + _, err := watch.Read(buf) + if err != nil { + log.Fatalln("Error reading watch file", err) + } for { n, err := watch.Read(buf) if err != nil {