Skip to content

Commit 91941a4

Browse files
committed
use filepath.IsAbs to support windows paths
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 9730a20 commit 91941a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bake/bake.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1360,8 +1360,8 @@ func toBuildOpt(t *Target, inp *Input) (*build.Options, error) {
13601360
if strings.HasPrefix(bi.ContextPath, "cwd://") {
13611361
bi.ContextPath = path.Clean(strings.TrimPrefix(bi.ContextPath, "cwd://"))
13621362
}
1363-
if !build.IsRemoteURL(bi.ContextPath) && bi.ContextState == nil && !path.IsAbs(bi.DockerfilePath) {
1364-
bi.DockerfilePath = path.Join(bi.ContextPath, bi.DockerfilePath)
1363+
if !build.IsRemoteURL(bi.ContextPath) && bi.ContextState == nil && !filepath.IsAbs(bi.DockerfilePath) {
1364+
bi.DockerfilePath = filepath.Join(bi.ContextPath, bi.DockerfilePath)
13651365
}
13661366
for k, v := range bi.NamedContexts {
13671367
if strings.HasPrefix(v.Path, "cwd://") {

0 commit comments

Comments
 (0)