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

Replace os.Exit in diff
This commit is contained in:
Kubernetes Prow Robot
2022-12-13 15:59:34 -08:00
committed by GitHub
2 changed files with 4 additions and 2 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)
}