Skip to content

Commit

Permalink
Set exitcode when CLI detects possible changes for files (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Nov 13, 2024
1 parent 26ac407 commit 538f7b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 2024-11-13 - [0.2.1]

### Bug fixes

- Set exitcode 2 when CLI detects possible changes for files.

## 2024-10-18 - [0.2.0]

### Breaking changes
Expand Down Expand Up @@ -54,6 +60,7 @@

First beta release

[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
[0.1.4]: https://github.com/mondeja/hledger-fmt/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/mondeja/hledger-fmt/compare/v0.1.2...v0.1.3
Expand Down
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.0"
version = "0.2.1"
edition = "2021"
description = "An opinionated hledger's journal files formatter."
repository = "https://github.com/mondeja/hledger-fmt"
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ fn main() {
if formatted == content {
continue;
}
exitcode = 2;

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

0 comments on commit 538f7b3

Please sign in to comment.