CLI: Fix config flag being ignored

Passing --config had no effect when passed.  It will now be applied as
the last config file and before any env var overrrides.
This commit is contained in:
Jason Wilder
2015-02-15 15:06:02 -07:00
parent 9223c95481
commit b6428b08d0
8 changed files with 31 additions and 38 deletions
+13
View File
@@ -0,0 +1,13 @@
package cmd
import (
"github.com/codegangsta/cli"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
)
func initRuntime(c *cli.Context) {
setting.NewConfigContext(c.GlobalString("config"))
sqlstore.NewEngine()
sqlstore.EnsureAdminUser()
}