dwyl / dwyl/phoenix-ecto-encryption-example

Environment variables loading with escaped quotes

Open
#20 5 comments 2 reactions 0 assignees View on GitHub
help wanted question technical
Dominant language
Elixir
Stars
291
Forks
21
Avg merge
1d 4h
Merged PRs (30d)
3

Description

Firstly, thank you so much for this amazing resource!

Onto the issue. When I insert this code:

https://github.com/dwyl/phoenix-ecto-encryption-example/blob/6d79f2595045ad74f9692390a39ed37f70a309d3/config/config.exs#L30-L42

and have (double/single) quotes around the values in the `.env` file, the environment variables are loaded with the quotes.

For example, in the `.env` file:

`export SOME_ENV_VAR="randomString"`

results in:

```
iex(3)> System.get_env("SOME_ENV_VAR")
"\"randomString\""
```

I'm not entirely sure why there's code to load the environment variables like this. Why not just do the standard `source .env`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.