From 123158e83bae50cf8acd511a5611abbfa37fdc8a Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 15 Apr 2020 11:57:35 +0200 Subject: podmanV2: fix nil deref Fix a typo when looking up a flag causing a nil deref and all commands to fail. Signed-off-by: Valentin Rothberg --- cmd/podmanV2/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/podmanV2/root.go b/cmd/podmanV2/root.go index 6fc83a26b..0639257ea 100644 --- a/cmd/podmanV2/root.go +++ b/cmd/podmanV2/root.go @@ -71,7 +71,7 @@ func preRunE(cmd *cobra.Command, _ []string) error { cmd.SetHelpTemplate(registry.HelpTemplate()) cmd.SetUsageTemplate(registry.UsageTemplate()) - if cmd.Flag("cpu_profile").Changed { + if cmd.Flag("cpu-profile").Changed { f, err := os.Create(registry.PodmanOptions.CpuProfile) if err != nil { return errors.Wrapf(err, "unable to create cpu profiling file %s", -- cgit v1.2.3-54-g00ecf