Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elixir-formatter is displaying an error on save #128

Open
RobStallion opened this issue Dec 5, 2018 · 0 comments
Open

elixir-formatter is displaying an error on save #128

RobStallion opened this issue Dec 5, 2018 · 0 comments

Comments

@RobStallion
Copy link
Member

RobStallion commented Dec 5, 2018

With phoenix version 1.4 came the inclusion of the formatter...

image

However, this is causing the following error...

image

This line causing the issue is...

  url: [host: Map.fetch!(System.get_env(), "APP_HOST")],

in the config file.

This seems to be happening because the formatter has not got access to env variables that the app would when the application is compiled (assuming you have sourced your .env file of course).

There may be a simple solution to this issue that allows us to both format on save but also keep the safety that the Map.fetch! syntax provides (it does not allow you to run the app if you have not set an env file that is needed in the applicaton (VERY VERY HELPFUL for people like me who forget to source envs far too often).

Haven't looking into solution yet. Just wanted to capture this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant