diff --git a/machines/shared/add_dependencies_to_project.jl b/machines/shared/add_dependencies_to_project.jl index 80a24ee13..008045e93 100644 --- a/machines/shared/add_dependencies_to_project.jl +++ b/machines/shared/add_dependencies_to_project.jl @@ -116,7 +116,11 @@ elseif Sys.isapple() global mk_preferences, local_preferences - # Just got the value for the setting, now write it to LocalPreferences.toml + # Just got the value for the setting, now write it to LocalPreferences.toml, + # but first reload the preferences from the LocalPreferences.toml file so that + # we don't overwrite the values that MPIPreferences has set. + local_preferences = TOML.parsefile(local_preferences_filename) + mk_preferences = local_preferences["moment_kinetics"] mk_preferences["mpi_library_path"] = mpi_library_path open(local_preferences_filename, "w") do io TOML.print(io, local_preferences, sorted=true)