Support windows style dockerfile paths for build cmd
Currently TestBuildRenamedDockerfile fails since passing custom dockerfile paths like: docker build -f dir/file . fails on windows because those are unix paths. Instead, on windows accept windows style paths like: docker build -f dir\file . and convert them to unix style paths using the helper we have in `pkg/archive` so that daemon can correctly locate the path in the context. Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
parent
c9b4e665f9
commit
140f461f50
5 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,7 @@ func TestCanonicalTarNameForPath(t *testing.T) {
|
|||
{`foo\bar`, "foo/bar/", false},
|
||||
}
|
||||
for _, v := range cases {
|
||||
if out, err := canonicalTarNameForPath(v.in); err != nil && !v.shouldFail {
|
||||
if out, err := CanonicalTarNameForPath(v.in); err != nil && !v.shouldFail {
|
||||
t.Fatalf("cannot get canonical name for path: %s: %v", v.in, err)
|
||||
} else if v.shouldFail && err == nil {
|
||||
t.Fatalf("canonical path call should have pailed with error. in=%s out=%s", v.in, out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue