Merge pull request #113508 from p-slavcheva/fix-diff-osexit

Replace os.Exit in diff

Kubernetes-commit: 3ceb213fc15c347874f50027977a76ee05a1bb92
This commit is contained in:
Kubernetes Publisher 2022-12-13 15:59:34 -08:00
commit 3e4add843d
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)
}