Plugins: Compose filesystem paths with filepath.Join (#28375)
* plugins: Fix filesystem path composition Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * plugins: Use filepath.Join to join filesystem paths Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
sdkgrpcplugin "github.com/grafana/grafana-plugin-sdk-go/backend/grpcplugin"
|
||||
@@ -38,7 +38,7 @@ func (p *TransformPlugin) Load(decoder *json.Decoder, base *PluginBase, backendP
|
||||
}
|
||||
|
||||
cmd := ComposePluginStartCommand(p.Executable)
|
||||
fullpath := path.Join(p.PluginDir, cmd)
|
||||
fullpath := filepath.Join(p.PluginDir, cmd)
|
||||
factory := grpcplugin.NewBackendPlugin(p.Id, fullpath, grpcplugin.PluginStartFuncs{
|
||||
OnStart: p.onPluginStart,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user