Open pcapel opened 1 year ago
Hi @pcapel - thanks for the report :)
I'd be happy to consider PRs for both those things (as well as the crash on unset $HOME
). XDG support isn't really on my radar at the moment, but if it can be done neatly without breaking anything else then I've got no objections to it.
Environment
Elixir & Erlang versions (elixir --version):
ExAws version
mix deps |grep ex_aws
HTTP client version. IE for hackney do
mix deps | grep hackney
Current behavior
Credentials are looked up in the home directory without respecting potential placement in
XDG_CONFIG_HOME
Expected behavior
Specification compliance
I had set up some aliases a while back to get configuration where I expect it, since the cli compliance isn't quite there yet either. I should have remembered that, but definitely didn't! Took me a bit to figure out, but it wasn't too bad.
I'd say there are two enhancements that can be made here:
The primary issue is that the failure mode for an entry being missing is the same as the failure mode for not finding the configuration at all. Respecting the XDG spec isn't a huge deal to me personally, but it was a bit of a goose chase to figure out why things were failing when my configurations looked the same as a team mate's. Granted, I am the one who forgot about aliasing my config locations π so that's on me!
I'd be happy to put in a little work to get a PR put together for one or both of the enhancements, depending on what is felt to be the best course for the project. I don't have a strong opinion personally as I'm relatively new to Elixir. I'd say that at the very least an error message that clearly delineates between a key not being set and the entire config file not being found is preferable to the current behavior.
Thanks for the project though! Works like a charm when I configure it correctly π