Skip to content

Commit

Permalink
Fix support for non absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
bchatelard committed Nov 28, 2024
1 parent bbc91a1 commit c704477
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/koyeb/deploy_addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package koyeb

import (
"fmt"
"path/filepath"

"github.com/koyeb/koyeb-api-client-go/api/v1/koyeb"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -63,9 +64,13 @@ func (h *addonsHandler) PostDeploy(ctx *CLIContext, definition *koyeb.Deployment
}

func (h *addonsHandler) Setup(ctx *CLIContext, dir string) error {
basePath, err := filepath.Abs(dir)
if err != nil {
return err
}
for _, addon := range h.addons {
log.Debugf("Running addon setup in dir %s", dir)
if err := addon.Setup(ctx, dir); err != nil {
if err := addon.Setup(ctx, basePath); err != nil {
return err
}
}
Expand Down

0 comments on commit c704477

Please sign in to comment.