|
|
|
|
@ -16,6 +16,11 @@ import (
|
|
|
|
|
func PluginFolders(dirs ...string) []string {
|
|
|
|
|
res := []string{}
|
|
|
|
|
|
|
|
|
|
if packerPluginPath := os.Getenv("PACKER_PLUGIN_PATH"); packerPluginPath != "" {
|
|
|
|
|
res = append(res, strings.Split(packerPluginPath, string(os.PathListSeparator))...)
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if path, err := os.Executable(); err != nil {
|
|
|
|
|
log.Printf("[ERR] Error finding executable: %v", err)
|
|
|
|
|
} else {
|
|
|
|
|
@ -30,9 +35,5 @@ func PluginFolders(dirs ...string) []string {
|
|
|
|
|
res = append(res, filepath.Join(cd, "plugins"))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if packerPluginPath := os.Getenv("PACKER_PLUGIN_PATH"); packerPluginPath != "" {
|
|
|
|
|
res = append(res, strings.Split(packerPluginPath, string(os.PathListSeparator))...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
|