MLB-LED-Scoreboard / mlb-led-scoreboard

An LED scoreboard for Major League Baseball :baseball:
GNU General Public License v3.0
590 stars 105 forks source link

Automatically update custom configurations on install #422

Closed ty-porter closed 1 year ago

ty-porter commented 1 year ago

Adding new config options is pretty confusing for end users, the existing messaging leads users to completely regenerate the config. However the config is pretty big, so updating it by hand tends not to happen, and if there are new keys then they will not be in the config and can lead to issues, such as (possibly) #387

When updating an existing installation that has a custom configuration (config.json)

  1. Automatically delete any keys that are no longer used (if any)
  2. Merge any missing keys with default values
  3. Provide a list of changes as feedback to the user once install is completed

If installing fresh, the existing copy from config.json.example -> config.json is still appropriate