|
| 1 | +# Exit Codes |
| 2 | + |
| 3 | +Commitizen handles expected exceptions through `CommitizenException` and returns different exit codes for different situations. They could be useful if you want to ignore specific errors in your pipeline. |
| 4 | + |
| 5 | +These exit codes can be found in `commitizen/exceptions.py::ExitCode`. |
| 6 | + |
| 7 | +| Exception | Exit Code | Description | |
| 8 | +| --------- | --------- | ----------- | |
| 9 | +| ExpectedExit | 0 | Expected exit | |
| 10 | +| DryRunExit | 0 | Exit due to passing `--dry-run` option | |
| 11 | +| NoCommitizenFoundException | 1 | Using a cz (e.g., `cz_jira`) that cannot be found in your system | |
| 12 | +| NotAGitProjectError | 2 | Not in a git project | |
| 13 | +| NoCommitsFoundError | 4 | No commit found | |
| 14 | +| NoVersionSpecifiedError | 4 | Version can not be found in configuration file | |
| 15 | +| NoPatternMapError | 5 | bump / changelog pattern or map can not be found in configuration file | |
| 16 | +| BumpCommitFailedError | 6 | Commit error when bumping version | |
| 17 | +| BumpTagFailedError | 7 | Tag error when bumping version | |
| 18 | +| NoAnswersError | 8 | No user response given | |
| 19 | +| CommitError | 9 | git commit error | |
| 20 | +| NoCommitBackupError | 10 | Commit back up file cannot be found | |
| 21 | +| NothingToCommitError | 11 | Nothing in staging to be committed | |
| 22 | +| CustomError | 12 | `CzException` raised | |
| 23 | +| NoCommandFoundError | 13 | No command found when running commitizen cli (e.g., `cz --debug`) | |
| 24 | +| InvalidCommitMessageError | 14 | The commit message does not pass `cz check` | |
| 25 | +| MissingConfigError | 15 | Configuration missed for `cz_customize` | |
| 26 | +| NoRevisionError | 16 | No revision found | |
| 27 | +| CurrentVersionNotFoundError | 17 | current version cannot be found in *version_files* | |
| 28 | +| InvalidCommandArgumentError | 18 | The argument provide to command is invalid (e.g. `cz check -commit-msg-file filename --rev-range master..`) | |
0 commit comments