Skip to content

Commit

Permalink
Exit always with code 0 when --no-diff option is used (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Jan 13, 2025
1 parent f6d916e commit 119a4e1
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 2025-01-14 - [0.2.3]

### Changes

- Exit always with code 0 when `--no-diff` option is used.

## 2025-01-13 - [0.2.2]

### Bug fixes
Expand Down Expand Up @@ -66,6 +72,7 @@

First beta release

[0.2.2]: https://github.com/mondeja/hledger-fmt/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/mondeja/hledger-fmt/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/mondeja/hledger-fmt/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/mondeja/hledger-fmt/compare/v0.1.4...v0.2.0
Expand Down
64 changes: 31 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hledger-fmt"
version = "0.2.2"
version = "0.2.3"
edition = "2021"
description = "An opinionated hledger's journal files formatter."
repository = "https://github.com/mondeja/hledger-fmt"
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn main() {
if formatted == content {
continue;
}
exitcode = 2;
exitcode = if no_diff { 0 } else { 2 };

if fix {
match std::fs::write(&file, &formatted) {
Expand Down

0 comments on commit 119a4e1

Please sign in to comment.