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

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
feature/371-morph_cache_metr
Evgenii Stratonikov 2023-06-01 16:30:54 +03:00 committed by Evgenii Stratonikov
parent 9562123c49
commit 96c9843591
1 changed files with 1 additions and 0 deletions

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)
}