mirror of
https://github.com/containers/podman.git
synced 2026-03-31 21:12:11 -04:00
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>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user