From 2de9f8aafdd6388c9f4db92ed669a0247af8c462 Mon Sep 17 00:00:00 2001 From: Burcu Dogan Date: Sun, 25 Aug 2013 18:28:54 +0200 Subject: [PATCH] devcam: add -openbrowser flag. Don't open the start page on browser by default. Change-Id: I1dc3804bf192dc5119c7d05758ccbacd0e7740f1 --- dev/devcam/server.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/devcam/server.go b/dev/devcam/server.go index 2c463671c..5bdc18f91 100644 --- a/dev/devcam/server.go +++ b/dev/devcam/server.go @@ -52,6 +52,8 @@ type serverCmd struct { noBuild bool fullClosure bool + + openBrowser bool // end of flag vars camliSrcRoot string // the camlistore source tree @@ -79,6 +81,8 @@ func init() { flags.BoolVar(&cmd.noBuild, "nobuild", false, "Do not rebuild anything.") flags.BoolVar(&cmd.fullClosure, "fullclosure", false, "Use the ondisk closure library.") + + flags.BoolVar(&cmd.openBrowser, "openbrowser", false, "Open the start page on startup.") return cmd }) } @@ -356,7 +360,8 @@ func (c *serverCmd) RunCommand(args []string) error { camliBin := filepath.Join(c.camliSrcRoot, "bin", "camlistored") cmdArgs := []string{ "-configfile=" + filepath.Join(c.camliSrcRoot, "config", "dev-server-config.json"), - "-listen=" + c.listen} + "-listen=" + c.listen, + "-openbrowser=" + strconv.FormatBool(c.openBrowser)} cmd := exec.Command(camliBin, cmdArgs...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr