Add missing OS_ARCH dir to global plugin paths

When the global directory was added, the discovery system still
attempted to search for OS_ARCH subdirectories. It has since been
changed only search explicit paths.
This commit is contained in:
James Bardin 2017-08-09 10:34:11 -04:00
parent 8b3b678c2f
commit 41ab0aef7a
1 changed files with 4 additions and 1 deletions

View File

@ -1,8 +1,10 @@
package main package main
import ( import (
"fmt"
"log" "log"
"path/filepath" "path/filepath"
"runtime"
) )
// globalPluginDirs returns directories that should be searched for // globalPluginDirs returns directories that should be searched for
@ -18,7 +20,8 @@ func globalPluginDirs() []string {
if err != nil { if err != nil {
log.Printf("[ERROR] Error finding global config directory: %s", err) log.Printf("[ERROR] Error finding global config directory: %s", err)
} else { } else {
ret = append(ret, filepath.Join(dir, "plugins")) machineDir := fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH)
ret = append(ret, filepath.Join(dir, "plugins", machineDir))
} }
return ret return ret