Commit 7d42771
Fix nested use of Mix.Config.eval!/2 (#7925)
Previously, if a config file uses Mix.Config.eval!/2 then it would fail with the
following error:
> ** (RuntimeError) could not set configuration via Mix.Config. This usually
> means you are trying to execute a configuration file directly instead of
> using the proper command, such as mix loadconfig
> code: assert Mix.Config.eval!(fixture_path("configs/nested_import.exs")) ==
> stacktrace:
> (mix) lib/mix/config.ex:71: Mix.Config.raise_improper_use!/0
> (mix) lib/mix/config.ex:222: Mix.Config.eval!/2
> lib/mix/test/mix/config_test.exs:110: (test)
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>1 parent 9812b74 commit 7d42771
File tree
3 files changed
+20
-13
lines changed- lib/mix
- lib/mix
- test
- fixtures/configs
- mix
3 files changed
+20
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| |||
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 216 | + | |
| 217 | + | |
221 | 218 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 219 | + | |
| 220 | + | |
225 | 221 | | |
226 | | - | |
227 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
0 commit comments