Skip to content

Support $XDG_CONFIG_HOME for config file #1521

Closed

Description

@ptman

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

Activity

  1. kamilogorek commented on Mar 15, 2023

    @kamilogorek
    Contributor

    There is only a single place it needs to be updated at -

    sentry-cli/src/config.rs

    Lines 455 to 462 in a29838b

    fn find_global_config_file() -> Result<PathBuf> {
    dirs::home_dir()
    .ok_or_else(|| format_err!("Could not find home dir"))
    .map(|mut path| {
    path.push(CONFIG_RC_FILE_NAME);
    path
    })
    }

    I'm happy to assist if you'd like to submit a PR :)

  2. evanpurkhiser commented on Mar 28, 2023

    @evanpurkhiser
    Member

    Would LOVE to see this get done!

  3. evanpurkhiser commented on Mar 28, 2023

    @evanpurkhiser
    Member

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

  4. github-actions commented on Apr 19, 2023

    @github-actions
    Contributor

    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 🥀

  5. szokeasaurusrex commented on Apr 5, 2024

    @szokeasaurusrex
    Member

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

  6. added 2 commits that reference this issue on May 2, 2024
    b4ae95f
    66becfe
  7. added a commit that references this issue on May 27, 2024
    c987094
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions