use filepath instead of path to check if the dockerfile path is abolute or not

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
Guillaume Lours 2021-12-03 11:37:07 +01:00 committed by Nicolas De loof
parent bc1160de72
commit a842522f49
1 changed files with 1 additions and 2 deletions

View File

@ -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)