elixir-formatter is displaying an error on save

Đang mở
#128 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

@RobStallion đang làm issue này rồi.

Từ ngày 5/12/2018.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

discuss priority-4 technical

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.

Ngôn ngữ chính
Elixir
Star
33
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dwyl/github-backup

Tất cả issue của dwyl/github-backup

Issue tương tự

Thêm issue về Elixir

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.