Replace os.exit in diff

Kubernetes-commit: 2dce194e1647396fa7bbd926bc8b007e91f09dee
This commit is contained in:
petya.slavcheva1 2022-12-13 14:27:35 +01:00 committed by Kubernetes Publisher
parent 0451c1d19e
commit cfebade04e
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ func NewCmdDiff(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.C
// return 1 if there was a problem.
if err := options.Run(); err != nil {
if exitErr := diffError(err); exitErr != nil {
os.Exit(exitErr.ExitStatus())
cmdutil.CheckErr(cmdutil.ErrExit)
}
cmdutil.CheckDiffErr(err)
}