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
+2 -4
View File
@@ -17,7 +17,6 @@ import (
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/middleware"
"github.com/grafana/grafana/pkg/services/eventpublisher"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/social"
)
@@ -71,10 +70,9 @@ func runWeb(c *cli.Context) {
log.Info("Starting Grafana")
log.Info("Version: %v, Commit: %v, Build date: %v", setting.BuildVersion, setting.BuildCommit, time.Unix(setting.BuildStamp, 0))
setting.NewConfigContext()
initRuntime(c)
social.NewOAuthService()
sqlstore.NewEngine()
sqlstore.EnsureAdminUser()
eventpublisher.Init()
var err error