mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Packaging: Added deprecation warnings when running grafana-cli
or grafana-server
; the grafana
command should be used instead. (#66976)
* Add grafana-cli and grafana-server deprecation warnings * remove extra :
This commit is contained in:
parent
4daf53fb08
commit
405bda7e99
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user