Merge pull request #54818 from apelisse/propagate-error-diff

Automatic merge from submit-queue (batch tested with PRs 54728, 54818). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

diff: Propragate errors when diffing

Because of that, errors while diffing would potentially not do anything,
leaving the user clueless of what was going on.

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-10-30 20:29:18 -07:00 committed by GitHub
commit 127dc0653f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,9 +446,8 @@ func RunDiff(f cmdutil.Factory, diff *DiffProgram, options *DiffOptions, from, t
Parser: parser,
Encoder: f.JSONEncoder(),
}
differ.Diff(obj, printer)
return nil
return differ.Diff(obj, printer)
})
if err != nil {
return err