Skip to content

Commit

Permalink
Always use exit code 1 on error
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Saloň committed Aug 1, 2024
1 parent d85ed92 commit 6efbc5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- commands will now exit with exit code 1 for all error types

### Fixed
- commands will now exit with exit code 1 for all error types

## [v1.0.20] - 2024-07-02

### Added
Expand Down
2 changes: 2 additions & 0 deletions src/cmdBuilder/executeRootCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func printError(err error, uxBlocks uxBlock.UxBlocks) {

if userErr := errorsx.AsUserError(err); userErr != nil {
uxBlocks.PrintError(styles.ErrorLine(err.Error()))
os.Exit(1)
return
}

Expand All @@ -80,6 +81,7 @@ func printError(err error, uxBlocks uxBlock.UxBlocks) {
uxBlocks.PrintError(styles.ErrorLine(string(meta)))
}

os.Exit(1)
return
}

Expand Down

0 comments on commit 6efbc5a

Please sign in to comment.