Skip to content

Fix misleading warning when email settings are missing on klirr invoice --email#40

Merged
Sajjon merged 3 commits intomainfrom
copilot/fix-email-setup-warning-message
Feb 23, 2026
Merged

Fix misleading warning when email settings are missing on klirr invoice --email#40
Sajjon merged 3 commits intomainfrom
copilot/fix-email-setup-warning-message

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

When running klirr invoice --email without email settings initialized, the warning incorrectly pointed users to klirr data init instead of klirr email init, since both data and email files live under the same data directory.

Changes

  • run.rs: Added EMAIL_INIT_HINT constant and has_missing_email_setup_data() which checks specifically for the email.ron file path. Updated log_data_setup_hint_or_error to match email-missing errors first, showing the correct hint before falling through to the generic data-missing check.
  • main.rs: Re-exported email_settings_path from klirr_core_invoice to make it available in run.rs.

Before:

WARN > 💡 You seem to not have set up klirr, run `klirr data init` to get started

After:

WARN > 💡 You seem to not have set up email, run `klirr email init` to get started

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Sajjon <864410+Sajjon@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix misleading log message for email setup Fix misleading warning when email settings are missing on klirr invoice --email Feb 22, 2026
Copilot AI requested a review from Sajjon February 22, 2026 21:25
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.06%. Comparing base (3345eed) to head (f488d95).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   95.06%   95.06%           
=======================================
  Files         101      101           
  Lines        2208     2208           
=======================================
  Hits         2099     2099           
  Misses        109      109           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sajjon Sajjon marked this pull request as ready for review February 23, 2026 06:54
@Sajjon Sajjon merged commit aa1dd86 into main Feb 23, 2026
7 checks passed
@Sajjon Sajjon deleted the copilot/fix-email-setup-warning-message branch February 23, 2026 07:12
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