diff --git a/main.go b/main.go index 823a347f747..7b3aa59083d 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,13 @@ func main() { app.Commands = []cli.Command{cmd.Web, cmd.ImportJson, cmd.ListAccounts, cmd.CreateAccount, cmd.DeleteAccount, cmd.ListDataSources} - app.Flags = append(app.Flags, []cli.Flag{}...) + app.Flags = append(app.Flags, []cli.Flag{ + cli.StringFlag{ + Name: "config", + Value: "grafana.ini", + Usage: "path to config file", + }, + }...) app.Run(os.Args) log.Close() diff --git a/pkg/cmd/accounts.go b/pkg/cmd/accounts.go index cc5de2ae18d..7849ef22246 100644 --- a/pkg/cmd/accounts.go +++ b/pkg/cmd/accounts.go @@ -17,13 +17,6 @@ var ListAccounts = cli.Command{ Usage: "list accounts", Description: "Lists the accounts in the system", Action: listAccounts, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "config", - Value: "grafana.ini", - Usage: "path to config file", - }, - }, } var CreateAccount = cli.Command{ @@ -31,13 +24,6 @@ var CreateAccount = cli.Command{ Usage: "create a new account", Description: "Creates a new account", Action: createAccount, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "config", - Value: "grafana.ini", - Usage: "path to config file", - }, - }, } var DeleteAccount = cli.Command{ @@ -45,13 +31,6 @@ var DeleteAccount = cli.Command{ Usage: "delete an existing account", Description: "Deletes an existing account", Action: deleteAccount, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "config", - Value: "grafana.ini", - Usage: "path to config file", - }, - }, } func listAccounts(c *cli.Context) { diff --git a/pkg/cmd/datasource.go b/pkg/cmd/datasource.go index c4d5f6042e2..2bab7785434 100644 --- a/pkg/cmd/datasource.go +++ b/pkg/cmd/datasource.go @@ -17,13 +17,6 @@ var ListDataSources = cli.Command{ Usage: "list datasources", Description: "Lists the datasources in the system", Action: listDatasources, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "config", - Value: "grafana.ini", - Usage: "path to config file", - }, - }, } func listDatasources(c *cli.Context) { diff --git a/pkg/cmd/import.go b/pkg/cmd/import.go index 14818d784a8..87754d9415d 100644 --- a/pkg/cmd/import.go +++ b/pkg/cmd/import.go @@ -28,11 +28,6 @@ var ImportJson = cli.Command{ Name: "account", Usage: "Account name to save dashboards under", }, - cli.StringFlag{ - Name: "config", - Value: "grafana.ini", - Usage: "path to config file", - }, }, } diff --git a/pkg/cmd/web.go b/pkg/cmd/web.go index 0b02b2011b4..1207a3b20ef 100644 --- a/pkg/cmd/web.go +++ b/pkg/cmd/web.go @@ -27,13 +27,6 @@ var Web = cli.Command{ Usage: "grafana web", Description: "Starts Grafana backend & web server", Action: runWeb, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "config", - Value: "grafana.ini", - Usage: "path to config file", - }, - }, } func newMacaron() *macaron.Macaron {