From 28034bf370a10444cefd6d985b223c0cb2d57eee Mon Sep 17 00:00:00 2001 From: Tom Haile Date: Mon, 20 Nov 2023 17:54:59 -0700 Subject: [PATCH] clarify relative path helper method args --- internal/super/flix.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/super/flix.go b/internal/super/flix.go index 786955240..a6ba01e50 100644 --- a/internal/super/flix.go +++ b/internal/super/flix.go @@ -332,9 +332,10 @@ func getTemplate(state *flowkit.State, flixService flixkit.FlixService, flixQuer return template, nil } -// GetRelativePath computes the relative path from target to source. -func GetRelativePath(source, target string) (string, error) { - relPath, err := filepath.Rel(filepath.Dir(target), source) +// GetRelativePath computes the relative path from generated file to flix json file. +// This path is used in the binding file to reference the flix json file. +func GetRelativePath(configFile, bindingFile string) (string, error) { + relPath, err := filepath.Rel(filepath.Dir(bindingFile), configFile) if err != nil { return "", err }