sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Support $XDG_CONFIG_HOME for config file

Open ptman opened this issue 2 years ago • 5 comments

Instead of only looking for the config file in ~/.sentryclirc please follow https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html and look in $XDG_CONFIG_HOME/sentry/cli.ini (or similar) or $HOME/.config/sentry/cli.ini if $XDG_CONFIG_HOME is unset.

There is even a nice Rust library for this: https://docs.rs/xdg/ https://github.com/whitequark/rust-xdg

ptman avatar Mar 15 '23 12:03 ptman

There is only a single place it needs to be updated at - https://github.com/getsentry/sentry-cli/blob/a29838bbeabacb448c6a2afa4cbec0f4086cd11f/src/config.rs#L455-L462 I'm happy to assist if you'd like to submit a PR :)

kamilogorek avatar Mar 15 '23 15:03 kamilogorek

Would LOVE to see this get done!

evanpurkhiser avatar Mar 28 '23 23:03 evanpurkhiser

We'll have to make sure we first try reading from the legacy path

evanpurkhiser avatar Mar 28 '23 23:03 evanpurkhiser

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Apr 19 '23 00:04 github-actions[bot]

@elramen Looks like there is already a partially completed PR (#1744) you could continue working on, or use as inspiration for this change

szokeasaurusrex avatar Apr 05 '24 11:04 szokeasaurusrex