mirror of
https://github.com/containers/podman.git
synced 2026-02-23 10:15:19 -05:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user