@@ -352,8 +352,6 @@ defmodule Mix do
352
352
* `MIX_INSTALL_DIR` - (since v1.12.0) specifies directory where `Mix.install/2` keeps
353
353
install cache
354
354
355
- * `MIX_INSTALL_FORCE` - (since v1.13.0) runs `Mix.install/2` with empty install cache
356
-
357
355
* `MIX_PATH` - appends extra code paths
358
356
359
357
* `MIX_PROFILE` - a list of comma-separated Mix tasks to profile the time spent on
@@ -661,13 +659,6 @@ defmodule Mix do
661
659
This function can only be called outside of a Mix project and only with the
662
660
same dependencies in the given VM.
663
661
664
- The `MIX_INSTALL_RESTORE_PROJECT_DIR` environment variable may be specified.
665
- It should point to a previous installation directory, which can be obtained
666
- with `Mix.install_project_dir/0` (after calling `Mix.install/2`). Using a
667
- restore dir may speed up the installation, since matching dependencies do
668
- not need be refetched nor recompiled. This environment variable is ignored
669
- if `:force` is enabled.
670
-
671
662
## Options
672
663
673
664
* `:force` - if `true`, runs with empty install cache. This is useful when you want
@@ -783,6 +774,22 @@ defmodule Mix do
783
774
The contents inside `defmodule` will only be expanded and executed
784
775
after `Mix.install/2` runs, which means that any struct, macros,
785
776
and imports will be correctly handled.
777
+
778
+ ## Environment variables
779
+
780
+ The `MIX_INSTALL_DIR` environment variable configures the directory that
781
+ caches all `Mix.install/2`. It defaults to the "mix/install" folder in the
782
+ default user cache of your operating system.
783
+
784
+ The `MIX_INSTALL_FORCE` is available since Elixir v1.13.0 and forces
785
+ `Mix.install/2` to discard any previously cached entry of the current install.
786
+
787
+ The `MIX_INSTALL_RESTORE_PROJECT_DIR` environment variable may be specified
788
+ since Elixir v1.16.2. It should point to a previous installation directory,
789
+ which can be obtained with `Mix.install_project_dir/0` (after calling `Mix.install/2`).
790
+ Using a restore dir may speed up the installation, since matching dependencies
791
+ do not need be refetched nor recompiled. This environment variable is ignored
792
+ if `:force` is enabled.
786
793
"""
787
794
@ doc since: "1.12.0"
788
795
def install ( deps , opts \\ [ ] )
@@ -1057,6 +1064,7 @@ defmodule Mix do
1057
1064
Returns the directory where the current `Mix.install/2` project
1058
1065
resides.
1059
1066
"""
1067
+ @ doc since: "1.16.2"
1060
1068
@ spec install_project_dir ( ) :: Path . t ( )
1061
1069
def install_project_dir ( ) do
1062
1070
case Mix.State . get ( :installed ) do
0 commit comments