1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-30 10:49:00 +01:00

server -o reports errors

This commit is contained in:
Oliver Steele 2017-06-22 08:34:56 -04:00
parent 8aafaf5b4b
commit 640b0697a7

View File

@ -41,7 +41,9 @@ func (s *Server) Run(open bool, logger func(label, value string)) error {
}()
logger("Server running...", "press ctrl-c to stop.")
if open {
browser.OpenURL("http://localhost:4000")
if err := browser.OpenURL("http://" + address); err != nil {
fmt.Println("Error opening page:", err)
}
}
return <-c
}