summaryrefslogtreecommitdiff
path: root/cmd/podman/registry/registry.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-29 20:50:43 +0200
committerGitHub <noreply@github.com>2020-04-29 20:50:43 +0200
commit99f8cfc2dc39b11cd315062167f1ffaf85eda946 (patch)
treeef78553ea144e1e872693714ff7f5fb4803162bf /cmd/podman/registry/registry.go
parenta2127efbf8fe0d1b3de577ddc83fa3c6be7629fd (diff)
parent6a586992c117bd34c69ca6747ac0c0f101c6ea89 (diff)
downloadpodman-99f8cfc2dc39b11cd315062167f1ffaf85eda946.tar.gz
podman-99f8cfc2dc39b11cd315062167f1ffaf85eda946.tar.bz2
podman-99f8cfc2dc39b11cd315062167f1ffaf85eda946.zip
Merge pull request #5956 from jwhonce/wip/version
V2 restore podman -v command
Diffstat (limited to 'cmd/podman/registry/registry.go')
-rw-r--r--cmd/podman/registry/registry.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/registry/registry.go b/cmd/podman/registry/registry.go
index 2e9d59d10..993b14cbc 100644
--- a/cmd/podman/registry/registry.go
+++ b/cmd/podman/registry/registry.go
@@ -2,6 +2,7 @@ package registry
import (
"context"
+ "fmt"
"github.com/containers/libpod/pkg/domain/entities"
"github.com/containers/libpod/pkg/domain/infra"
@@ -86,7 +87,7 @@ func SubCommandExists(cmd *cobra.Command, args []string) error {
// IdOrLatestArgs used to validate a nameOrId was provided or the "--latest" flag
func IdOrLatestArgs(cmd *cobra.Command, args []string) error {
if len(args) > 1 || (len(args) == 0 && !cmd.Flag("latest").Changed) {
- return errors.New(`command requires a name, id or the "--latest" flag`)
+ return fmt.Errorf("%s requires a name, id or the '--latest' flag", cmd.Name())
}
return nil
}