DockerCLI/cli/compose/loader
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
..
example1.env Import docker/docker/cli 2017-04-17 17:40:59 -04:00
example2.env Import docker/docker/cli 2017-04-17 17:40:59 -04:00
full-example.yml Add "host-gateway" to tests for extra_hosts / --add-host 2020-04-15 09:53:37 +02:00
full-struct_test.go Add "host-gateway" to tests for extra_hosts / --add-host 2020-04-15 09:53:37 +02:00
interpolate.go Add interpolation type cast for max_replicas_per_node 2019-11-05 13:15:57 -08:00
loader.go compose/loader: define type for transformer-functions 2020-01-06 13:16:40 +01:00
loader_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
merge.go cli/compose/loader: Using a reference for the variable on range scope `overrideService` (scopelint) 2020-01-06 13:16:53 +01:00
merge_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
types_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-04-21 16:43:18 +02:00
volume.go fix panic on single-character volumes 2020-04-28 11:58:25 +02:00
volume_test.go fix panic on single-character volumes 2020-04-28 11:58:25 +02:00
windows_path.go Detect Windows absolute paths on non-Windows CLI 2019-07-10 23:40:22 +02:00
windows_path_test.go compose/loader: fix TestIsAbs not testing all combinations 2020-01-06 13:16:21 +01:00