cli: grafana-cli should receive flags from the command line (#17606)
grafana-cli should allow configuration overrides to be received from the command line. e.g. ``` grafana-cli admin reset-password cfg:default.paths.logs=custom/log/directory/ ``` Seems like we missed the inclusion of `flag.Parse` as we run the command, to be able to consume them. Additionally, it'll be useful for the user to know whenever these are being overriden or not - hence the addition of logging the configuration to be used as we run the command.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
@@ -17,6 +18,7 @@ var version = "master"
|
||||
func main() {
|
||||
setupLogging()
|
||||
|
||||
flag.Parse()
|
||||
app := cli.NewApp()
|
||||
app.Name = "Grafana cli"
|
||||
app.Usage = ""
|
||||
|
||||
Reference in New Issue
Block a user