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

Only print table header if there are actually accounts that need updates #117

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

hoostus
Copy link
Contributor

@hoostus hoostus commented Jan 4, 2025

The needs-update function prints the main table header "Last Updated .... Account" even if there isn't anything that needs to be updated. However, the "Accounts without balance entries" table header only gets printed if there is something that needs to be displayed.

This very small change removes the main table header if there are no accounts that need to be updated. Admittedly this is possibly a personal preference: do you want to see the empty table header but no accounts to reassure you that nothing needs to be updated? Or would you prefer to see the command exit silently (somewhat in keeping with other unix commands)? It doesn't seem worth adding a command-line option for this behaviour so I've just made it the default.

@redstreet
Copy link
Owner

redstreet commented Jan 4, 2025

Thanks, and agree: I've generally preferred the unix philosophy of a silent exit if there's nothing to print. If you could prepend your commit with fix: , it'll pass the conventional commits format test, and I can merge it.

The other test breakages seem unrelated to your commit, please don't worry about those.

Only print table header if there are actually accounts
that need updates.
@hoostus
Copy link
Contributor Author

hoostus commented Jan 5, 2025

I've edited the commit message.

@redstreet redstreet merged commit 60acadb into redstreet:main Jan 5, 2025
1 of 2 checks passed
@redstreet
Copy link
Owner

Great, thank you, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants