Skip to content

Default to ~/.config/gmailctl for newly created config dirs.#455

Open
lgarron wants to merge 2 commits into
mbrt:masterfrom
lgarron:config-dir
Open

Default to ~/.config/gmailctl for newly created config dirs.#455
lgarron wants to merge 2 commits into
mbrt:masterfrom
lgarron:config-dir

Conversation

@lgarron

@lgarron lgarron commented Jun 17, 2026

Copy link
Copy Markdown

This is a minimal fix for #144

It is a revision of #393 and uses a library for the internal XDG path calculation per feedback there.

This is a minimal fix for mbrt#144

It is a revision of mbrt#393 and uses a library for the internal XDG path calculation per feedback there.
Comment thread README.md
Comment thread cmd/gmailctl/cmd/root_cmd.go Outdated
Comment thread README.md
Comment on lines +153 to +160
Configuration and credentials are in a shared directory, either in a default orq
custom location.

- `~/.config/gmailctl` — This is the current default location.
- `~/.gmailctl` — This was the previous default location. `gmailctl` will continue
to use this location if it exists on your device.
- Custom location: use the `--config` argument.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configuration and credentials are in a shared directory, either in a default orq
custom location.
- `~/.config/gmailctl` — This is the current default location.
- `~/.gmailctl` — This was the previous default location. `gmailctl` will continue
to use this location if it exists on your device.
- Custom location: use the `--config` argument.
Configuration and credentials are in either:
- `<XDG_BASE_DIR>/gmailctl` (using the [XDG base directory spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), commonly `~/.config/gmailctl` on Linux.
- `~/.gmailctl`: The previous default location. If the directory exists `gmailctl` will continue to use it for backward compatibility
- Custom location: use the `--config` argument.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wasn't sure how verbose to be. Anyhow, it's also the same on macOS (where I use gmailctl).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah alright, then you can add "and MacOS" as well.

Co-authored-by: Michele Bertasi <405934+mbrt@users.noreply.github.com>
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.56%. Comparing base (1316284) to head (2f01d10).

Files with missing lines Patch % Lines
cmd/gmailctl/cmd/root_cmd.go 0.00% 6 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     #455      +/-   ##
==========================================
- Coverage   37.60%   37.56%   -0.05%     
==========================================
  Files          54       54              
  Lines        3670     3674       +4     
==========================================
  Hits         1380     1380              
- Misses       2199     2203       +4     
  Partials       91       91              

☔ 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.

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