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
3737 file = System . get_env ( "MIX_EXS" ) || "mix.exs"
3838
3939 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 )
4141 Code . put_compiler_option ( :no_warn_undefined , :all )
4242 Code . compile_file ( file )
43- Code . put_compiler_option ( :no_warn_undefined , old_value )
43+ Code . put_compiler_option ( :no_warn_undefined , old_undefined )
4444 end
4545 end
4646
Original file line number Diff line number Diff line change @@ -721,15 +721,17 @@ defmodule Mix.Project do
721721
722722 { new_proj , file } =
723723 if File . regular? ( file ) do
724+ old_undefined = Code . get_compiler_option ( :no_warn_undefined )
725+
724726 try do
725- Code . compiler_options ( relative_paths: false )
727+ Code . compiler_options ( relative_paths: false , no_warn_undefined: :all )
726728 _ = Code . compile_file ( file )
727729 get ( )
728730 else
729731 ^ old_proj -> Mix . raise ( "Could not find a Mix project at #{ file } " )
730732 new_proj -> { new_proj , file }
731733 after
732- Code . compiler_options ( relative_paths: true )
734+ Code . compiler_options ( relative_paths: true , no_warn_undefined: old_undefined )
733735 end
734736 else
735737 push ( nil , file , app )
You can’t perform that action at this time.
0 commit comments