Summary: When running mix escript.install github me/myrepo
, configuration options (either defined in config.exs OR in application.env) are not executed. However, if I locally pull down the code and run mix escript.build
for the local directory, config.exs is used correctly.
Is this a bug in elixir or am I doing something wrong?
Example code:
config.exs
config :myapp myflag: 42
mix.exs
def application do
[
extra_applications: [:logger],
env: [myflag: 42]
]
myapp.ex
def main(args) do
Application.get_env(:myapp, :myflag)
|> IO.inspect
end
expected: 42, actual: nil when pulling from github