Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Update pulse.go to pass both file and signing file of plugin for auto…
Browse files Browse the repository at this point in the history
…discover
  • Loading branch information
geauxvirtual committed Oct 26, 2015
1 parent 40fd2c1 commit 5a039aa
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pulse.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,10 @@ func action(ctx *cli.Context) {
//Autodiscover
if autodiscoverPath != "" {
log.Info("auto discover path is enabled")
log.Info("autoloading plugins from: ", autodiscoverPath)
paths := filepath.SplitList(autodiscoverPath)
c.SetAutodiscoverPaths(paths)
for _, path := range paths {
files, err := ioutil.ReadDir(path)
fullPath, err := filepath.Abs(path)
if err != nil {
log.WithFields(
log.Fields{
Expand All @@ -415,12 +414,23 @@ func action(ctx *cli.Context) {
}).Fatal(err)
os.Exit(1)
}
log.Info("autoloading plugins from: ", fullPath)
files, err := ioutil.ReadDir(fullPath)
if err != nil {
log.WithFields(
log.Fields{
"_block": "main",
"_module": "pulsed",
"autodiscoverpath": fullPath,
}).Fatal(err)
os.Exit(1)
}
for _, file := range files {
if file.IsDir() {
continue
}
if strings.HasSuffix(file.Name(), ".aci") || !(strings.HasSuffix(file.Name(), ".asc")) {
pl, err := c.Load(fmt.Sprintf("%s/%s", path, file.Name()))
pl, err := c.Load(fullPath+"/"+file.Name(), fullPath+"/"+file.Name()+".asc")
if err != nil {
log.WithFields(log.Fields{
"_block": "main",
Expand Down

0 comments on commit 5a039aa

Please sign in to comment.