Skip to content

Show the actual default config directory in --help - #466

Merged
mbrt merged 1 commit into
masterfrom
bug/463
Sep 26, 2026
Merged

mbrt merged 1 commit into
masterfrom
bug/463

Conversation

@mbrt

@mbrt mbrt commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Issue #463 reports that gmailctl init always uses ~/.gmailctl and ignores the XDG config directory. That was true in v0.12.0, the version it was tested with, but the XDG support landed afterwards in #455 and is not released yet.

What remained wrong was the documentation, which made the location hard to guess:

  • The --config help text claimed the fallback is always $HOME/.config/gmailctl.
  • The README referred to <XDG_BASE_DIR>, which is not a variable defined by the XDG spec.

The help text now prints the resolved path, computed the same way as the directory actually used, and the README names XDG_CONFIG_HOME, its per-platform defaults, and points to --help for the exact path.

Close #463.

Issue #463 reports that `gmailctl init` always uses ~/.gmailctl and
ignores the XDG config directory. That was true in v0.12.0, the version
it was tested with, but the XDG support landed afterwards in #455 and
is not released yet.

What remained wrong was the documentation, which made the location
hard to guess:

- The --config help text claimed the fallback is always
  $HOME/.config/gmailctl.
- The README referred to `<XDG_BASE_DIR>`, which is not a variable
  defined by the XDG spec.

The help text now prints the resolved path, computed the same way as
the directory actually used, and the README names XDG_CONFIG_HOME, its
per-platform defaults, and points to --help for the exact path.

Close #463.
@mbrt mbrt added the kind/docs label Sep 26, 2026
@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.22%. Comparing base (3bb877d) to head (14a4125).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/gmailctl/cmd/root_cmd.go 0.00% 3 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
- Coverage   39.23%   39.22%   -0.02%     
==========================================
  Files          54       54              
  Lines        3680     3681       +1     
==========================================
  Hits         1444     1444              
- Misses       2135     2136       +1     
  Partials      101      101              

☔ View full report in Codecov by Harness.
📢 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.

@mbrt
mbrt merged commit a50084d into master Sep 26, 2026
4 of 5 checks passed
@mbrt
mbrt deleted the bug/463 branch September 26, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initialization ignores <XDG_BASE_DIR>/gmailctl

1 participant