diff options
author | Ashley Cui <acui@redhat.com> | 2021-09-28 17:01:57 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2021-09-29 16:39:29 -0400 |
commit | 4fc40c82f7e916a3d164a26f6f2ee51f1f323ab6 (patch) | |
tree | 578731eee26e78c18d677569044653330ab190e4 /cmd | |
parent | 5064fd519cfd09395f9632ecb94492949b7a8367 (diff) | |
download | podman-4fc40c82f7e916a3d164a26f6f2ee51f1f323ab6.tar.gz podman-4fc40c82f7e916a3d164a26f6f2ee51f1f323ab6.tar.bz2 podman-4fc40c82f7e916a3d164a26f6f2ee51f1f323ab6.zip |
Remind user to check connection or use podman machine
Remind user to check their remote linux connection or use podman
machine. Move the warning from bindings to cmd/podman.
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/root.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go index c798e6634..2ab011631 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -92,6 +92,11 @@ func Execute() { if registry.GetExitCode() == 0 { registry.SetExitCode(define.ExecErrorCodeGeneric) } + if registry.IsRemote() { + if strings.Contains(err.Error(), "unable to connect to Podman") { + fmt.Fprintln(os.Stderr, "Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM") + } + } fmt.Fprintln(os.Stderr, formatError(err)) } os.Exit(registry.GetExitCode()) |