File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ defmodule Mix.CLI do
37
37
file = System . get_env ( "MIX_EXS" ) || "mix.exs"
38
38
39
39
if File . regular? ( file ) do
40
- old_value = Code . get_compiler_option ( :no_warn_undefined )
40
+ old_undefined = Code . get_compiler_option ( :no_warn_undefined )
41
41
Code . put_compiler_option ( :no_warn_undefined , :all )
42
42
Code . compile_file ( file )
43
- Code . put_compiler_option ( :no_warn_undefined , old_value )
43
+ Code . put_compiler_option ( :no_warn_undefined , old_undefined )
44
44
end
45
45
end
46
46
Original file line number Diff line number Diff line change @@ -721,15 +721,17 @@ defmodule Mix.Project do
721
721
722
722
{ new_proj , file } =
723
723
if File . regular? ( file ) do
724
+ old_undefined = Code . get_compiler_option ( :no_warn_undefined )
725
+
724
726
try do
725
- Code . compiler_options ( relative_paths: false )
727
+ Code . compiler_options ( relative_paths: false , no_warn_undefined: :all )
726
728
_ = Code . compile_file ( file )
727
729
get ( )
728
730
else
729
731
^ old_proj -> Mix . raise ( "Could not find a Mix project at #{ file } " )
730
732
new_proj -> { new_proj , file }
731
733
after
732
- Code . compiler_options ( relative_paths: true )
734
+ Code . compiler_options ( relative_paths: true , no_warn_undefined: old_undefined )
733
735
end
734
736
else
735
737
push ( nil , file , app )
You can’t perform that action at this time.
0 commit comments