From e6ec1aaffe791a265ca7716813de47dacc4b70e8 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 2 May 2018 12:50:44 -0400 Subject: Trivial refactor on volume addition Signed-off-by: Matthew Heon Closes: #700 Approved by: rhatdan --- cmd/podman/spec.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go index 7cd21aeba..fc2ab267d 100644 --- a/cmd/podman/spec.go +++ b/cmd/podman/spec.go @@ -658,8 +658,7 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er // others, if they are included volumes := make([]string, 0, len(c.Volumes)) for _, vol := range c.Volumes { - splitVol := strings.Split(vol, ":") - volumes = append(volumes, splitVol[0]) + volumes = append(volumes, strings.SplitN(vol, ":", 2)[0]) } options = append(options, libpod.WithUserVolumes(volumes)) -- cgit v1.2.3-54-g00ecf