mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Merge pull request #2198 from kirbyfan64/better-refresh-rootless-error
Show a better error message when podman info fails during a refresh
This commit is contained in:
@ -824,7 +824,11 @@ func (r *Runtime) refreshRootless() error {
|
|||||||
// Take advantage of a command that requires a new userns
|
// Take advantage of a command that requires a new userns
|
||||||
// so that we are running as the root user and able to use refresh()
|
// so that we are running as the root user and able to use refresh()
|
||||||
cmd := exec.Command(os.Args[0], "info")
|
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
|
// Reconfigures the runtime after a reboot
|
||||||
|
Reference in New Issue
Block a user