Improve error message when the the podman service is not enabled

Currently if server is not connected, we return an error message that
is confusing users on Mac and Windows boxes.  The hope here is to make
it a little easier to discover that a Podman service is required.

This message is similar to what Docker puts out so people might under
stand it better.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2021-01-08 11:11:56 -05:00
parent 49db79e735
commit ea68f178e0

View File

@ -158,7 +158,7 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
// Prep the engines
if _, err := registry.NewImageEngine(cmd, args); err != nil {
return err
return errors.Wrapf(err, "Cannot connect to the Podman socket, make sure there is a Podman REST API service running.")
}
if _, err := registry.NewContainerEngine(cmd, args); err != nil {
return err