--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/ec5f75cb-5d2e-4247-91be-934caf049b03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAOtk34f7_q1Zpzzou_QOEUFthsX1M4120DY1zJNdpRvDYyBaLQ%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/yw54VGwGkt4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2B33q7qEWaBzRwqBn4Wz5KLrtv145Tebxxpm4%2Bb6JUBmA%40mail.gmail.com.
How about we make System.env a Dict, so you can do: Dict.fetch!(System.env, :foo)
Maybe a better name would be `System.fetch_env!/1` to match the Dict module a bit better?
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/0ad8f7aa-9f38-4980-b4fd-9dfa88d4aefe%40googlegroups.com.
System.get_env |> Map.fetch!("FOO")
secret_key_base: System.get_env("SECRET_KEY_BASE") || raise("ENV variable not set: SECRET_KEY_BASE")
Now that I've tried the Map.fetch! Way of doing things and it doesn't work that well, I think it would be nice to have System.get_env! added. What does everyone else think?
Either way it would probably be good to make System.get_env work more reliably so you can use Map.fetch! Maybe what's happening now is a bug? I'll open up an issue about that next week just in case.
I would love to have a raising version too. As it stands, I often get confusing errors deep in the system because of missing ENV variables. Is this something we can add?
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/f66bbf70-e99d-48ef-8c4c-d1bfae031c88%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KG2Ws1E9Yc63_5%3DB%3DT4t5DC5pp3uPAfS07Ta6SebQ%3DxQ%40mail.gmail.com.