Skip to content

Commit ccdefd9

Browse files
fxnjosevalim
authored andcommitted
Improves the docs of config/runtime.exs and Config.config_env/0 (#10414)
1 parent ff95a59 commit ccdefd9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/elixir/lib/config.ex

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ defmodule Config do
6464
## config/runtime.exs
6565
6666
For runtime configuration, you can use the `config/runtime.exs` file.
67-
It is executed after your Mix project is compiled and also before a
68-
release (assembled with `mix release`) starts.
67+
It is executed right before applications start in both Mix and releases
68+
(assembled with `mix release`).
6969
"""
7070

7171
@opts_key {__MODULE__, :opts}
@@ -160,7 +160,10 @@ defmodule Config do
160160
end
161161

162162
@doc """
163-
Returns the environemnt this configuration file is executed on.
163+
Returns the environment this configuration file is executed on.
164+
165+
In Mix projects this function returns the environment this configuration
166+
file is executed on. In releases, the environment when `mix release` ran.
164167
165168
This is most often used to execute conditional code:
166169

0 commit comments

Comments
 (0)