|
|
@ -4,6 +4,7 @@ import ( |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli" |
|
|
|
"github.com/codegangsta/cli" |
|
|
|
|
|
|
|
"github.com/fatih/color" |
|
|
|
"github.com/grafana/grafana/pkg/cmd/grafana-cli/log" |
|
|
|
"github.com/grafana/grafana/pkg/cmd/grafana-cli/log" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -12,7 +13,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C |
|
|
|
|
|
|
|
|
|
|
|
cmd := &contextCommandLine{context} |
|
|
|
cmd := &contextCommandLine{context} |
|
|
|
if err := command(cmd); err != nil { |
|
|
|
if err := command(cmd); err != nil { |
|
|
|
log.Error("\nError: ") |
|
|
|
log.Errorf("\n%s: ", color.RedString("Error")) |
|
|
|
log.Errorf("%s\n\n", err) |
|
|
|
log.Errorf("%s\n\n", err) |
|
|
|
|
|
|
|
|
|
|
|
cmd.ShowHelp() |
|
|
|
cmd.ShowHelp() |
|
|
|