Clarification about system_env options in mix dep definition

Hi all,

I have 2 phoenix projects: foo and bar.
In foo mix.exs I have: {:bar, path: "../bar", system_env: [{"SB", "False"}]}

If I print out the env variable SB from bar lib/bar_web/router.ex I always get the default value, I never get False.

To print out the env variable I am using: IO.inspect(System.get_env("SB", "True"))

The command I am using to compile is mix compile from foo.

As a side note, if I use SB=False mix compile from foo, the variable is printed correctly.

Am I missing something here?

Thank you

I’m wondering if this might not be supported for path dependencies. By my limited understanding they work quite a bit differently than pulling in the dependency into deps.

2 Likes

I tried with a git dependency, I got the same result.
Unfortunately, the dependency is not on hex.