From 1d7d21819138b2b1c7abd732dbf26bca5fc8e951 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 9 Sep 2020 10:43:42 -0400 Subject: Fix podman container runlabel --display Current podman container runlabel --display is being ignored. This is just supposed to display the command that would be run, and then exit, but instead is actually running the command. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1877186 Signed-off-by: Daniel J Walsh --- pkg/domain/infra/abi/containers_runlabel.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go index ab2316d47..3983ba3a8 100644 --- a/pkg/domain/infra/abi/containers_runlabel.go +++ b/pkg/domain/infra/abi/containers_runlabel.go @@ -36,6 +36,11 @@ func (ic *ContainerEngine) ContainerRunlabel(ctx context.Context, label string, return err } + if options.Display { + fmt.Printf("command: %s\n", strings.Join(append([]string{os.Args[0]}, cmd[1:]...), " ")) + return nil + } + stdErr := os.Stderr stdOut := os.Stdout stdIn := os.Stdin -- cgit v1.2.3-54-g00ecf