DockerCLI/cli/compose
Sebastiaan van Stijn 4ad65fc358
fix panic on single-character volumes
Before this change, this would cause a panic:

    docker run -it --rm -v 1:/1 alpine
    panic: runtime error: index out of range

    goroutine 1 [running]:
    github.com/docker/cli/cli/compose/loader.isFilePath(0xc42027e058, 0x1, 0x557dcb978c20)
    ...

After this change, a correct error is returned:

    docker run -it --rm -v 1:/1 alpine
    docker: Error response from daemon: create 1: volume name is too short, names should be at least two alphanumeric characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 11869fa42a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 11:58:25 +02:00
..
convert bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
interpolation bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
loader fix panic on single-character volumes 2020-04-28 11:58:25 +02:00
schema bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
template bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
types cli/compose/types/types.go:106:2: structtag: struct field tag `yaml:",inline", json:"-"` not compatible with reflect.StructTag.Get: key:"value" pairs not separated by spaces (govet) 2020-01-06 13:16:32 +01:00