Skip to content

Commit 4f2f92c

Browse files
author
Daniel Perez
committed
Add documenation about env variables to Mix module.
1 parent 08f1c2b commit 4f2f92c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/mix/lib/mix.ex

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,24 @@ defmodule Mix do
152152
with extra clean up logic.
153153
154154
Note aliases do not show up on `mix help`.
155+
156+
## Environment variables
157+
158+
Environment variables can be used to modify Mix behaviour.
159+
160+
Mix responds to the following variables:
161+
162+
* `MIX_ARCHIVE` - allows specifying the directory into which the archives should be installed
163+
* `MIX_DEBUG` - outputs debug information about each task before running it
164+
* `MIX_ENV` - allows specifying which environment should be used. see Environments
165+
* `MIX_EXS` - allows changing the full path to the `mix.exs` file
166+
* `MIX_HOME` - stores configuration files and scripts shared by multiple implementations
167+
* `MIX_PATH` - allows expanding the code path
168+
* `MIX_QUIET` - does not print information messages to the terminal
169+
170+
Variables which do not take a value should be set to either `1` or `true`, for example:
171+
172+
$ MIX_DEBUG=1 mix compile
155173
"""
156174

157175
use Application

0 commit comments

Comments
 (0)