[#406] cmd/common: Execute PersistentPostRun() on errors

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-06-01 16:30:54 +03:00 committed by Evgenii Stratonikov
parent 9562123c49
commit 96c9843591

View file

@ -46,5 +46,6 @@ func ExitOnErr(cmd *cobra.Command, errFmt string, err error) {
}
cmd.PrintErrln(err)
cmd.PersistentPostRun(cmd, nil)
os.Exit(code)
}