Skip to content

Commit

Permalink
Merge pull request #13130 from nalind/slashify-dockerfile-4.0
Browse files Browse the repository at this point in the history
[v4.0] pkg/bindings/images.Build(): slashify "dockerfile" values, too
  • Loading branch information
openshift-merge-robot authored Feb 3, 2022
2 parents 18348c0 + 0c9a8ac commit 337f706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/bindings/images/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
}

tarContent := []string{options.ContextDirectory}
newContainerFiles := []string{}
newContainerFiles := []string{} // dockerfile paths, relative to context dir, ToSlash()ed

dontexcludes := []string{"!Dockerfile", "!Containerfile", "!.dockerignore", "!.containerignore"}
for _, c := range containerFiles {
Expand Down Expand Up @@ -380,7 +380,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
tarContent = append(tarContent, containerfile)
}
}
newContainerFiles = append(newContainerFiles, containerfile)
newContainerFiles = append(newContainerFiles, filepath.ToSlash(containerfile))
}
if len(newContainerFiles) > 0 {
cFileJSON, err := json.Marshal(newContainerFiles)
Expand Down

0 comments on commit 337f706

Please sign in to comment.