Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
5da34194
Unverified
Commit
5da34194
authored
Jan 12, 2021
by
Arve Knudsen
Committed by
GitHub
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better logging of plugin scanning errors (#30231)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent
de3a7610
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pkg/plugins/plugins.go
+3
-3
No files found.
pkg/plugins/plugins.go
View file @
5da34194
...
...
@@ -204,11 +204,11 @@ func (pm *PluginManager) scan(pluginDir string, requireSigned bool) error {
// 1st pass: Scan plugins, also mapping plugins to their respective directories
if
err
:=
util
.
Walk
(
pluginDir
,
true
,
true
,
scanner
.
walker
);
err
!=
nil
{
if
errors
.
Is
(
err
,
os
.
ErrNotExist
)
{
pm
.
log
.
Debug
(
"Couldn't scan directory since it doesn't exist"
,
"pluginDir"
,
pluginDir
)
pm
.
log
.
Debug
(
"Couldn't scan directory since it doesn't exist"
,
"pluginDir"
,
pluginDir
,
"err"
,
err
)
return
nil
}
if
errors
.
Is
(
err
,
os
.
ErrPermission
)
{
pm
.
log
.
Debug
(
"Couldn't scan directory due to lack of permissions"
,
"pluginDir"
,
pluginDir
)
pm
.
log
.
Debug
(
"Couldn't scan directory due to lack of permissions"
,
"pluginDir"
,
pluginDir
,
"err"
,
err
)
return
nil
}
if
pluginDir
!=
"data/plugins"
{
...
...
@@ -320,7 +320,7 @@ func (s *PluginScanner) walker(currentPath string, f os.FileInfo, err error) err
// example https://github.com/raintank/worldping-app/tree/master/dist/grafana-worldmap-panel worldmap panel plugin
// is embedded in worldping app.
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"filepath.Walk reported an error for %q: %w"
,
currentPath
,
err
)
}
if
f
.
Name
()
==
"node_modules"
||
f
.
Name
()
==
"Chromium.app"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment