From c5f408b00887c0c3130e06b5dc234a6b0ca99b2d Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Mon, 21 Jan 2019 13:35:06 -0600 Subject: Show a better error message when podman info fails during a refresh Signed-off-by: Ryan Gonzalez --- libpod/runtime.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/runtime.go b/libpod/runtime.go index facbe5d66..11c90166d 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -772,7 +772,11 @@ func (r *Runtime) refreshRootless() error { // Take advantage of a command that requires a new userns // so that we are running as the root user and able to use refresh() cmd := exec.Command(os.Args[0], "info") - return cmd.Run() + err := cmd.Run() + if err != nil { + return errors.Wrapf(err, "Error running %s info while refreshing state", os.Args[0]) + } + return nil } // Reconfigures the runtime after a reboot -- cgit v1.2.3-54-g00ecf