Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change flag parse error handling to return errors instead of exi…
…ting (#107) * fix: change flag parse error handling to return errors instead of exiting Having ExitOnError in combination with SetOutput to a buffer instead of stdout/stderr means flags.Parse output is swallowed and kubeconform silently exits directly with exit code 2 instead of returning the error. Setting ContinueOnError instead returns the error, and writes usage help to the buffer, so error handling code in main is reached. * Add test for parsing incorrect flags Co-authored-by: Yann Hamon <[email protected]>
- Loading branch information