Skip to content

Commit

Permalink
fix(worker): plugin deploy
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault authored and richardlt committed Jan 17, 2020
1 parent 7a2cad4 commit 65f463b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions engine/worker/internal/requirement.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net"
"os"
"os/exec"
"path"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -254,11 +253,11 @@ func checkPluginDeployment(ctx context.Context, w *CurrentWorker, job sdk.Workfl
}

// then try to download the plugin
integrationPluginBinary := path.Join(w.BaseDir().Name(), binary.Name)
if _, err := w.BaseDir().Stat(integrationPluginBinary); os.IsNotExist(err) {
//integrationPluginBinary := path.Join(w.BaseDir().Name(), binary.Name)
if _, err := w.BaseDir().Stat(binary.Name); os.IsNotExist(err) {
log.Debug("Downloading the plugin %s", binary.PluginName)
//If the file doesn't exist. Download it.
fi, err := os.OpenFile(integrationPluginBinary, os.O_CREATE|os.O_RDWR, os.FileMode(binary.Perm))
fi, err := w.BaseDir().OpenFile(binary.Name, os.O_CREATE|os.O_RDWR, os.FileMode(binary.Perm))
if err != nil {
return false, err
}
Expand Down

0 comments on commit 65f463b

Please sign in to comment.