Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix accidental overwriting of settings in LocalPreferences.toml on MacOS #213

Merged
merged 1 commit into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion machines/shared/add_dependencies_to_project.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading