@@ -674,6 +674,9 @@ defmodule Mix do
674
674
* `:lockfile` (since v1.14.0) - path to a lockfile to be used as a basis of
675
675
dependency resolution.
676
676
677
+ * `:start_applications` (since v1.15.3) - if `true`, ensures that installed app
678
+ and its dependencies are started after install (Default: `true`)
679
+
677
680
## Examples
678
681
679
682
Installing `:decimal` and `:jason`:
@@ -794,6 +797,7 @@ defmodule Mix do
794
797
config_path = expand_path ( opts [ :config_path ] , deps , :config_path , "config/config.exs" )
795
798
system_env = Keyword . get ( opts , :system_env , [ ] )
796
799
consolidate_protocols? = Keyword . get ( opts , :consolidate_protocols , true )
800
+ start_applications? = Keyword . get ( opts , :start_applications , true )
797
801
798
802
id =
799
803
{ deps , config , system_env , consolidate_protocols? }
@@ -893,9 +897,11 @@ defmodule Mix do
893
897
end
894
898
end )
895
899
896
- for % { app: app , opts: opts } <- Mix.Dep . cached ( ) ,
897
- Keyword . get ( opts , :runtime , true ) and Keyword . get ( opts , :app , true ) do
898
- Application . ensure_all_started ( app )
900
+ if start_applications? do
901
+ for % { app: app , opts: opts } <- Mix.Dep . cached ( ) ,
902
+ Keyword . get ( opts , :runtime , true ) and Keyword . get ( opts , :app , true ) do
903
+ Application . ensure_all_started ( app )
904
+ end
899
905
end
900
906
901
907
Mix.State . put ( :installed , id )
0 commit comments