File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -352,12 +352,21 @@ defmodule ElixirLS.Mix do
352352 new_md5 = external_lockfile |> File . read! ( ) |> :erlang . md5 ( )
353353
354354 if old_md5 != new_md5 do
355- lockfile = Path . join ( install_dir , "mix.lock" )
356- old_lock = Mix.Dep.Lock . read ( lockfile )
357- new_lock = Mix.Dep.Lock . read ( external_lockfile )
358- Mix.Dep.Lock . write ( Map . merge ( old_lock , new_lock ) , file: lockfile )
359- File . write! ( md5_path , Base . encode64 ( new_md5 ) )
360- Mix.Task . rerun ( "deps.get" )
355+ if Version . match? ( System . version ( ) , ">= 1.14.0-dev" ) do
356+ lockfile = Path . join ( install_dir , "mix.lock" )
357+ old_lock = Mix.Dep.Lock . read ( lockfile )
358+ new_lock = Mix.Dep.Lock . read ( external_lockfile )
359+ Mix.Dep.Lock . write ( Map . merge ( old_lock , new_lock ) , file: lockfile )
360+ File . write! ( md5_path , Base . encode64 ( new_md5 ) )
361+ Mix.Task . rerun ( "deps.get" )
362+ else
363+ IO . puts (
364+ :stderr ,
365+ "Lockfile conflict. Please clean up your mix install directory #{ install_dir } "
366+ )
367+
368+ System . halt ( 1 )
369+ end
361370 end
362371
363372 first_build? ->
You can’t perform that action at this time.
0 commit comments