summaryrefslogtreecommitdiff
path: root/cmd/podman/spec.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-05-02 12:50:44 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-03 12:23:12 +0000
commite6ec1aaffe791a265ca7716813de47dacc4b70e8 (patch)
tree7facf2cded49930052ef0c72c76268304fa9e60e /cmd/podman/spec.go
parent6ebb90f951f5dbfd02fced5902e0adbce68102ba (diff)
downloadpodman-e6ec1aaffe791a265ca7716813de47dacc4b70e8.tar.gz
podman-e6ec1aaffe791a265ca7716813de47dacc4b70e8.tar.bz2
podman-e6ec1aaffe791a265ca7716813de47dacc4b70e8.zip
Trivial refactor on volume addition
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #700 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/spec.go')
-rw-r--r--cmd/podman/spec.go3
1 files changed, 1 insertions, 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))