From 743f9f7efc7df05525b8cc3f41b5af4a17ef4469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Fri, 1 May 2020 22:21:32 +0200 Subject: [PATCH] Don't show any podman hint about restarting sudo --- pkg/drivers/kic/oci/cli_runner.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/drivers/kic/oci/cli_runner.go b/pkg/drivers/kic/oci/cli_runner.go index 173b509d2..7c9d2852a 100644 --- a/pkg/drivers/kic/oci/cli_runner.go +++ b/pkg/drivers/kic/oci/cli_runner.go @@ -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 { -- GitLab