diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-07-17 18:47:05 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-07-17 15:47:05 -0700 |
commit | e718d2544f6c719bc6e31f569400f44d54de3a34 (patch) | |
tree | be01ad094f309d49092685b4ea377c2ed12904b0 /plugin | |
parent | f2c180390599e66fee2f1a8c1a4ab52eea920c51 (diff) | |
download | chat-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')
-rw-r--r-- | plugin/supervisor.go | 6 |
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") } |