You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Support searching in XDG_CONFIG/DATA_HOME for the required values
Produce more appropriate errors/warnings surrounding the failure to locate expected files within directories
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 😝
The text was updated successfully, but these errors were encountered:
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):
Elixir 1.14.3 (compiled with Erlang/OTP 25)
ExAws version
mix deps |grep ex_aws
locked at 2.4.1 (ex_aws) 803387db
HTTP client version. IE for hackney do
mix deps | grep hackney
locked at 1.18.1 (hackney) a4ecdaff
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 😝
The text was updated successfully, but these errors were encountered: