Background
The script unconditionally overwrites the user's settings.json:
curl -fsSL "$REPO_BASE_URL/.../default_settings_MacOS.json" > "$SETTINGS_FILE"
This destroys existing user settings. Design a merge strategy — e.g. download defaults to a temp file, then merge with the existing settings.json (Python + json module in a temporary venv, or jq if available), preserving user keys unless explicitly overridden. Back up the original before modifying.
"This is not good, you are overwriting the settings file, which might not be ideal... We don't want to overwrite users settings... perhaps create a venv, and then merge the two jsons...?"
Possible solution
- Just check for existing user settings file and exit installation with a warning/instruction
- Ask to verify before overwriting
Background
The script unconditionally overwrites the user's
settings.json:This destroys existing user settings. Design a merge strategy — e.g. download defaults to a temp file, then merge with the existing
settings.json(Python +jsonmodule in a temporary venv, orjqif available), preserving user keys unless explicitly overridden. Back up the original before modifying.Possible solution