mirror of
https://github.com/docker/compose.git
synced 2026-10-24 04:43:58 +00:00
Add defensive code
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
657e89449a
commit
cd233ceb5c
1 changed files with 3 additions and 0 deletions
|
|
@ -315,6 +315,9 @@ func getVolumesFrom(project *types.Project, volumesFrom []string) ([]string, []s
|
|||
}
|
||||
for _, vol := range volumesFrom {
|
||||
spec := strings.Split(vol, ":")
|
||||
if len(spec) == 0 {
|
||||
continue
|
||||
}
|
||||
if spec[0] == "container" {
|
||||
volumes = append(volumes, strings.Join(spec[1:], ":"))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue