kubectl/pkg/cmd/util
Antoine Pelisse 4c36396b35 kubectl-diff: Return non-1 errors on kubectl failures
Currently, diff AND kubectl can return 1 errors either when diff finds
differences, or when kubectl fails something. It also prints an ugly
error when diff finds a differences, since 1 is treated as an error.

Two things this PR does:

1. If diff returns 1, then do not treat it as an error, and exit with
exit code 1. It no longer prints the ugly error.

2. Kubectl errors are +1'd so that they never return 1 which shouldn't
be considered an error.

We need to update the documentation accordingly, to mention that
`KUBECTL_EXTERNAL_DIFF` programs must also follow the convention of
using one as their exit code for changes detected.

Kubernetes-commit: f2b21f08d95291212ba8987aa9d446c02a96089a
2020-01-21 13:52:41 -08:00
..
editor Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00
sanity Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00
factory.go Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00
factory_client_access.go Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00
helpers.go kubectl-diff: Return non-1 errors on kubectl failures 2020-01-21 13:52:41 -08:00
helpers_test.go Fix kubectl panic when handling invalid error. 2019-09-19 21:48:50 -07:00
kubectl_match_version.go remove pkg/version and some of redundant copies of it 2019-09-10 14:42:55 -07:00
printing.go Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-28 21:29:36 -07:00