From e718d2544f6c719bc6e31f569400f44d54de3a34 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Tue, 17 Jul 2018 18:47:05 -0400 Subject: MM-11366: support a plugin bundle with multiple executables (#9121) This avoids the need to distribute multiple plugins per architecture. --- plugin/supervisor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/supervisor.go b/plugin/supervisor.go index 1e1005f53..f6264f47c 100644 --- a/plugin/supervisor.go +++ b/plugin/supervisor.go @@ -7,6 +7,7 @@ import ( "fmt" "os/exec" "path/filepath" + "runtime" "strings" "time" @@ -39,7 +40,10 @@ func newSupervisor(pluginInfo *model.BundleInfo, parentLogger *mlog.Logger, apiI }, } - executable := filepath.Clean(filepath.Join(".", pluginInfo.Manifest.Backend.Executable)) + executable := filepath.Clean(filepath.Join( + ".", + pluginInfo.Manifest.GetExecutableForRuntime(runtime.GOOS, runtime.GOARCH), + )) if strings.HasPrefix(executable, "..") { return nil, fmt.Errorf("invalid backend executable") } -- cgit v1.2.3-1-g7c22