From 70a167e922c5f8c735ad05979d16dc542968ab23 Mon Sep 17 00:00:00 2001 From: mpl Date: Mon, 23 Sep 2013 12:06:18 +0200 Subject: [PATCH] devcam server: do not use os.Getenv Since 0d854e106c696a759f0a55ef4f5ea43cabc04e38, we do not use the env directly, but a copy of it, so os.Getenv does not work to retrieve vars that were set in that copy. Change-Id: Ibc6ab40ea2ee51e1dea6a5e9ceac782304e0039a --- dev/devcam/server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/devcam/server.go b/dev/devcam/server.go index 37fc4ed73..ae1011eb6 100644 --- a/dev/devcam/server.go +++ b/dev/devcam/server.go @@ -300,17 +300,17 @@ func (c *serverCmd) setupIndexer() error { "-user=postgres", "-password=postgres", "-host=localhost", - "-dbname="+os.Getenv("CAMLI_DBNAME")) + "-dbname="+c.env.m["CAMLI_DBNAME"]) case c.mysql: args = append(args, "-user=root", "-password=root", "-host=localhost", - "-dbname="+os.Getenv("CAMLI_DBNAME")) + "-dbname="+c.env.m["CAMLI_DBNAME"]) case c.sqlite: args = append(args, "-dbtype=sqlite", - "-dbname="+os.Getenv("CAMLI_DBNAME")) + "-dbname="+c.env.m["CAMLI_DBNAME"]) default: return nil } @@ -396,7 +396,7 @@ func (c *serverCmd) RunCommand(args []string) error { } log.Printf("Starting dev server on %v/ui/ with password \"pass3179\"\n", - os.Getenv("CAMLI_BASEURL")) + c.env.m["CAMLI_BASEURL"]) camliBin := filepath.Join("bin", "camlistored") cmdArgs := []string{