From a842522f4966948514f9cd372a7073da02a87bc6 Mon Sep 17 00:00:00 2001 From: Guillaume Lours Date: Fri, 3 Dec 2021 11:37:07 +0100 Subject: [PATCH] use filepath instead of path to check if the dockerfile path is abolute or not Signed-off-by: Guillaume Lours --- pkg/compose/build.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/compose/build.go b/pkg/compose/build.go index 024795cf2..bc3d61f1d 100644 --- a/pkg/compose/build.go +++ b/pkg/compose/build.go @@ -20,7 +20,6 @@ import ( "context" "fmt" "os" - "path" "path/filepath" "github.com/compose-spec/compose-go/types" @@ -289,7 +288,7 @@ func mergeArgs(m ...types.Mapping) types.Mapping { } func dockerFilePath(context string, dockerfile string) string { - if urlutil.IsGitURL(context) || path.IsAbs(dockerfile) { + if urlutil.IsGitURL(context) || filepath.IsAbs(dockerfile) { return dockerfile } return filepath.Join(context, dockerfile)