diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-29 10:31:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 10:31:06 -0400 |
commit | 512a994e8b422f2bdd77c521f7042cd04cfb90db (patch) | |
tree | a643e04c12ed37a62963d8aeea0024e18e9b0a27 /cmd/podman/root.go | |
parent | 453c49c488dd6518b33393e04c04ebc32ce61ee9 (diff) | |
parent | 97f755f87b786884b293098646e5f242e119348c (diff) | |
download | podman-512a994e8b422f2bdd77c521f7042cd04cfb90db.tar.gz podman-512a994e8b422f2bdd77c521f7042cd04cfb90db.tar.bz2 podman-512a994e8b422f2bdd77c521f7042cd04cfb90db.zip |
Merge pull request #11637 from ashley-cui/warn
[NO TESTS NEEDED] Remind user to check connection or use podman machine
Diffstat (limited to 'cmd/podman/root.go')
-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 58cab0268..eb30f1ef6 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()) |