File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 8
8
"github.com/codegangsta/cli"
9
9
"github.com/grafana/grafana/pkg/cmd/grafana-cli/commands"
10
10
"github.com/grafana/grafana/pkg/cmd/grafana-cli/log"
11
- "strings"
12
11
)
13
12
14
13
var version = "master"
@@ -18,7 +17,7 @@ func getGrafanaPluginDir() string {
18
17
defaultNix := "/var/lib/grafana/plugins"
19
18
20
19
if currentOS == "windows" {
21
- return "C: \\ opt \\ grafana \\ plugins"
20
+ return ".. \\ data \\ plugins"
22
21
}
23
22
24
23
pwd , err := os .Getwd ()
@@ -29,16 +28,16 @@ func getGrafanaPluginDir() string {
29
28
}
30
29
31
30
if isDevenvironment (pwd ) {
32
- return "../../../ data/plugins"
31
+ return "../data/plugins"
33
32
}
34
33
35
34
return defaultNix
36
35
}
37
36
38
37
func isDevenvironment (pwd string ) bool {
39
- // if grafana-cli is executed from the cmd folder we can assume
40
- // that its in development environment.
41
- return strings . HasSuffix ( pwd , "/pkg/cmd/grafana-cli" )
38
+ // if ../conf/default.ini exists, grafana is not installed as package
39
+ _ , err := os . Stat ( "../conf/default.ini" )
40
+ return err != nil
42
41
}
43
42
44
43
func main () {
You can’t perform that action at this time.
0 commit comments