summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-20 05:51:57 -0400
committerGitHub <noreply@github.com>2020-06-20 05:51:57 -0400
commit60425c96d06c9666e8ba310579a08173aee81839 (patch)
tree20d1e6e47423893a19b8a2db6c33e183776b852e /cmd
parent21f3bdf63d6f1a9791f18294ecf53b3ced6dbb10 (diff)
parent71f6dd47ddce82545865739cb3382c0beb3f65a4 (diff)
downloadpodman-60425c96d06c9666e8ba310579a08173aee81839.tar.gz
podman-60425c96d06c9666e8ba310579a08173aee81839.tar.bz2
podman-60425c96d06c9666e8ba310579a08173aee81839.zip
Merge pull request #6676 from lsm5/tag-correction
Account for non-default port number in image name
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images/list.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 83acb53d9..b7a8b8911 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -193,7 +193,7 @@ func sortImages(imageS []*entities.ImageSummary) []imageReporter {
}
func tokenRepoTag(tag string) (string, string) {
- tokens := strings.SplitN(tag, ":", 2)
+ tokens := strings.Split(tag, ":")
switch len(tokens) {
case 0:
return tag, ""
@@ -201,6 +201,8 @@ func tokenRepoTag(tag string) (string, string) {
return tokens[0], ""
case 2:
return tokens[0], tokens[1]
+ case 3:
+ return tokens[0] + ":" + tokens[1], tokens[2]
default:
return "<N/A>", ""
}