From c70447790fe03af8b20408680dfc1524e0264765 Mon Sep 17 00:00:00 2001 From: Bastien Chatelard Date: Thu, 28 Nov 2024 17:34:06 +0100 Subject: [PATCH] Fix support for non absolute path --- pkg/koyeb/deploy_addons.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/koyeb/deploy_addons.go b/pkg/koyeb/deploy_addons.go index dfe7c98..7110960 100644 --- a/pkg/koyeb/deploy_addons.go +++ b/pkg/koyeb/deploy_addons.go @@ -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" @@ -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 } }