Skip to content

Commit

Permalink
Merge pull request #213 from mabarnes/macos-more-machine-setup-fixes
Browse files Browse the repository at this point in the history
Fix accidental overwriting of settings in LocalPreferences.toml on MacOS
  • Loading branch information
johnomotani authored May 11, 2024
2 parents f168743 + 2a36b6a commit 1d2d337
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 1d2d337

Please sign in to comment.