diff --git a/pkg/util/cmd/cmd.go b/pkg/util/cmd/cmd.go index b0ec8b07501..85d9e8be1f2 100644 --- a/pkg/util/cmd/cmd.go +++ b/pkg/util/cmd/cmd.go @@ -8,6 +8,8 @@ import ( "path/filepath" "runtime" "syscall" + + "github.com/fatih/color" ) func RunGrafanaCmd(subCmd string) int { @@ -17,6 +19,13 @@ func RunGrafanaCmd(subCmd string) int { return 1 } + switch filepath.Base(curr) { + case "grafana-server": + fmt.Printf("%s: %s\n", color.RedString("Deprecation warning"), "The standalone 'grafana-server' program is deprecated and will be removed in the future. Please update all uses of 'grafana-server' to 'grafana server'") + case "grafana-cli": + fmt.Printf("%s: %s\n", color.RedString("Deprecation warning"), "The standalone 'grafana-cli' program is deprecated and will be removed in the future. Please update all uses of 'grafana-cli' to 'grafana cli'") + } + executable := "grafana" if runtime.GOOS == "windows" { executable += ".exe"