Skip to content

feat: add REMOVE_OLD_CONFIGS to clear old configs before modpack install - #4266

Open
alberto-is wants to merge 1 commit into
itzg:masterfrom
alberto-is:feat/remove-old-configs
Open

feat: add REMOVE_OLD_CONFIGS to clear old configs before modpack install#4266
alberto-is wants to merge 1 commit into
itzg:masterfrom
alberto-is:feat/remove-old-configs

Conversation

@alberto-is

Copy link
Copy Markdown

Closes #3883

Adds a REMOVE_OLD_CONFIGS env var that clears the /data/config directory on server boot, before the modpack config is downloaded and unpacked. This is useful when updating a modpack, as old locally customized config files can otherwise be left behind and override the new config.

Changes

  • Add REMOVE_OLD_CONFIGS env var (defaults to false), with CONFIG_OUT_DIR, REMOVE_OLD_CONFIGS_INCLUDE, REMOVE_OLD_CONFIGS_EXCLUDE and REMOVE_OLD_CONFIGS_DEPTH for tuning
  • Run the cleanup at the start of start-setupModpack, before processing the modpack config
  • Add removeOldConfigs to start-utils, following the existing removeOldMods implementation
  • Document the new variable in docs/mods-and-plugins/index.md
  • Add a setup-only test covering removal of an old config and installation of the pack config

Testing

  • bash -n scripts/start-setupModpack scripts/start-utils
  • tests/setuponlytests/remove-old-configs passes (remove-old-configs PASSED verify)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add REMOVE_OLD_CONFIGS

1 participant