Commit 2527289e by Torkel Ödegaard

Merge branch 'master' of github.com:grafana/grafana

parents 581ffb86 8e70e9c1
...@@ -14,6 +14,7 @@ import ( ...@@ -14,6 +14,7 @@ import (
"os" "os"
"path" "path"
"regexp" "regexp"
"strings"
) )
func validateInput(c CommandLine, pluginFolder string) error { func validateInput(c CommandLine, pluginFolder string) error {
...@@ -160,7 +161,11 @@ func downloadFile(pluginName, filePath, url string) (err error) { ...@@ -160,7 +161,11 @@ func downloadFile(pluginName, filePath, url string) (err error) {
} else { } else {
dst, err := os.Create(newFile) dst, err := os.Create(newFile)
if err != nil { if err != nil {
log.Errorf("%v", err) if strings.Contains(err.Error(), "permission denied") {
return fmt.Errorf(
"Could not create file %s. permission deined. Make sure you have write access to plugindir",
newFile)
}
} }
defer dst.Close() defer dst.Close()
src, err := zf.Open() src, err := zf.Open()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment