Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit always with code 0 when --no-diff option is used #15

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading