Open cdegroot opened 2 years ago
That's totally fine with me - any relatively sane behaviour is preferable to a crash :) A PR to that effect would be most welcome. Apologies for the delay getting back to you.
Seems like this is related to #932. If there's not ongoing work to this effect I'd be happy to include this protection in my PR pending a review of the desirable changes with a maintainer.
We use the "three-step" auth method as documented: env var, ~/.aws profile, ecs/instance profile. This allows our code to run on a variety of platforms with a single configuration and it works perfectly.
Today, I installed said code as a systemctl-managed daemon and that failed:
The cause is clear: the code in
file.ex
usesSystem.user_home()
which ends up basically reading theHOME
environment variable.The fix could be simple as well:
System.user_home() || "/"
would already do the trick and is sort of the expected behavior on Unix systems - if there is no home set, the root directory will do. In most cases, this should be invisible but I'm filing this as an issue rather than as a PR because it's likely to be one of these things that people want to discuss :)