Where / How does the Mix environment variable get set?

And for anyone who isn’t already aware (like me until relatively recently), this means you can set the environment on each mix command.

Unix-like:

MIX_ENV=prod mix {task}

Windows:

set "MIX_ENV=prod" && mix {task}
10 Likes