summaryrefslogtreecommitdiffstats
path: root/plugin/supervisor.go
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-07-17 18:47:05 -0400
committerChristopher Speller <crspeller@gmail.com>2018-07-17 15:47:05 -0700
commite718d2544f6c719bc6e31f569400f44d54de3a34 (patch)
treebe01ad094f309d49092685b4ea377c2ed12904b0 /plugin/supervisor.go
parentf2c180390599e66fee2f1a8c1a4ab52eea920c51 (diff)
downloadchat-e718d2544f6c719bc6e31f569400f44d54de3a34.tar.gz
chat-e718d2544f6c719bc6e31f569400f44d54de3a34.tar.bz2
chat-e718d2544f6c719bc6e31f569400f44d54de3a34.zip
MM-11366: support a plugin bundle with multiple executables (#9121)
This avoids the need to distribute multiple plugins per architecture.
Diffstat (limited to 'plugin/supervisor.go')
-rw-r--r--plugin/supervisor.go6
1 files changed, 5 insertions, 1 deletions
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")
}