Skip to content

Support XDG_CONFIG_HOME env var on MacOS #28

@emchristiansen

Description

@emchristiansen

Thanks for making this! It seems very cool!

SecretSpec currently does not support XDG_CONFIG_HOME, and so on MacOS it writes configs to ~/Library/Application Support/.

❯ env | grep XDG
XDG_CACHE_HOME=/Users/ericmc/.cache
XDG_CONFIG_HOME=/Users/ericmc/.config
XDG_DATA_HOME=/Users/ericmc/.local/share
XDG_STATE_HOME=/Users/ericmc/.local/state

~
❯ secretspec config init
> Select your preferred provider backend: onepassword: OnePassword password manager (e.g., onepassword://vault,onepassword://work@Production, onepassword+token://vault)
> Select your default profile: default
✓ Configuration saved to /Users/ericmc/Library/Application Support/secretspec/config.toml

~ took 7s
❯ secretspec config show
Configuration file: /Users/ericmc/Library/Application Support/secretspec/config.toml

Provider: onepassword
Profile:  default

According to ChatGPT O3, this could be fixed by using a different crate for resolving the config dir (it suggests etcetera or cross-xdg).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions