Show a better error message when podman info fails during a refresh

Signed-off-by: Ryan Gonzalez <rymg19@gmail.com>
This commit is contained in:
Ryan Gonzalez 2019-01-21 13:35:06 -06:00
parent ba3509665c
commit 61216937e7
1 changed files with 5 additions and 1 deletions

View File

@ -824,7 +824,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