File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -576,17 +576,19 @@ defmodule Mix do
576576
577577 :ok = Mix.Local . append_archives ( )
578578 :ok = Mix.ProjectStack . push ( __MODULE__ . InstallProject , config , "nofile" )
579+ build_dir = Path . join ( dir , "_build" )
579580
580581 try do
581- run_deps? = not File . dir? ( Path . join ( dir , "_build" ) )
582+ run_deps? = not File . dir? ( build_dir )
582583 File . mkdir_p! ( dir )
583584
584585 File . cd! ( dir , fn ->
585586 if run_deps? do
586587 Mix.Task . rerun ( "deps.get" )
587588 end
588589
589- Mix.Task . run ( "compile" )
590+ Mix.Task . rerun ( "deps.loadpaths" )
591+ Mix.Task . rerun ( "compile" )
590592 end )
591593
592594 for app <- Mix.Project . deps_apps ( ) do
Original file line number Diff line number Diff line change @@ -85,6 +85,20 @@ defmodule MixTest do
8585 end
8686 end
8787
88+ test "install after errors" , % { tmp_dir: tmp_dir } do
89+ assert_raise Mix.Error , "Can't continue due to errors on dependencies" , fn ->
90+ Mix . install ( [
91+ { :bad , path: Path . join ( tmp_dir , "bad" ) }
92+ ] )
93+ end
94+
95+ Mix . install ( [
96+ { :install_test , path: Path . join ( tmp_dir , "install_test" ) }
97+ ] )
98+
99+ assert apply ( InstallTest , :hello , [ ] ) == :world
100+ end
101+
88102 test "consolidate_protocols: false" , % { tmp_dir: tmp_dir } do
89103 Mix . install (
90104 [
You can’t perform that action at this time.
0 commit comments