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:
gotjosh
2019-06-17 11:27:26 +01:00
committed by GitHub
parent aa1f9cdd40
commit 6fbca90269
2 changed files with 18 additions and 10 deletions
+2
View File
@@ -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 = ""