diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-06-05 14:57:11 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-11 11:01:13 +0200 |
commit | 9232d4e44365e0fa344fc5432dfd4843cb4c200c (patch) | |
tree | 6132181e6e6ebcc105c8c23ef94349183c9ce7c0 | |
parent | 402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6 (diff) | |
download | podman-9232d4e44365e0fa344fc5432dfd4843cb4c200c.tar.gz podman-9232d4e44365e0fa344fc5432dfd4843cb4c200c.tar.bz2 podman-9232d4e44365e0fa344fc5432dfd4843cb4c200c.zip |
generate systemd: rephrase lookup error
Rephrase the lookup error when the specified name or ID does not refer
to a container or pod. Until, only the pod-lookup error has been
returned which can be confusing when actually looking for a container;
a user might have just mistyped the ID or name.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r-- | pkg/domain/infra/abi/generate.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go index abb5e2911..08cb87287 100644 --- a/pkg/domain/infra/abi/generate.go +++ b/pkg/domain/infra/abi/generate.go @@ -40,7 +40,7 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, // We're either having a pod or garbage. pod, err := ic.Libpod.LookupPod(nameOrID) if err != nil { - return nil, err + return nil, errors.Errorf("%q does not refer to a container or pod", nameOrID) } // Error out if the pod has no infra container, which we require to be the |