提交 743f9f7e 编写于 作者: A Anders F Björklund

Don't show any podman hint about restarting sudo

上级 c65225d2
......@@ -131,7 +131,10 @@ func runCmd(cmd *exec.Cmd, warnSlow ...bool) (*RunResult, error) {
if warn {
if elapsed > warnTime {
out.WarningT(`Executing "{{.command}}" took an unusually long time: {{.duration}}`, out.V{"command": rr.Command(), "duration": elapsed})
out.ErrT(out.Tip, `Restarting the {{.name}} service may improve performance.`, out.V{"name": cmd.Args[0]})
// Don't show any restarting hint, when running podman locally (on linux, with sudo). Only when having a service.
if cmd.Args[0] != "sudo" {
out.ErrT(out.Tip, `Restarting the {{.name}} service may improve performance.`, out.V{"name": cmd.Args[0]})
}
}
if ctx.Err() == context.DeadlineExceeded {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册