mirror of https://github.com/perkeep/perkeep.git
devcam server: do not use os.Getenv
Since 0d854e106c
, 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
This commit is contained in:
parent
7b1261bd42
commit
70a167e922
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue