cupcakearmy / autorestic

Config driven, easy backup cli for restic.
https://autorestic.vercel.app/
Apache License 2.0
1.16k stars 68 forks source link

Fix default value of `XDG_CONFIG_HOME` in config path resolution #347

Closed beatbrot closed 5 months ago

beatbrot commented 6 months ago

A seemingly undocumented feature of autorestic is, that config files are loaded from $XDG_CONFIG_HOME/.config/autorestic by default. The code suggests, that the default value for $XDG_CONFIG_HOME is supposed to be ~/.config/.

Unfortunately, the code had a minor bug that lead to the default being ~.

This PR fixes this bug, adds a few tests and mentions this feature in the documentation.

This is my first Go code, so please give feedback where needed :)

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
autorestic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 1, 2024 8:00pm