summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-04-15 11:57:35 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-04-15 11:57:35 +0200
commit123158e83bae50cf8acd511a5611abbfa37fdc8a (patch)
treebfaa768f5ed4ca44c2cace17e9f9d279ead19d25 /cmd
parentf0b6cdede554316643187d40c67684daf5a2a2bb (diff)
downloadpodman-123158e83bae50cf8acd511a5611abbfa37fdc8a.tar.gz
podman-123158e83bae50cf8acd511a5611abbfa37fdc8a.tar.bz2
podman-123158e83bae50cf8acd511a5611abbfa37fdc8a.zip
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 <rothberg@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podmanV2/root.go2
1 files changed, 1 insertions, 1 deletions
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",