TechnicPack / TechnicSolder

PHP web app that brings differential updates to the Technic Launcher and Technic Platform
https://docs.solder.io/
Other
169 stars 167 forks source link

Improved config copying to respect an existing config directory #526

Closed Bo98 closed 8 years ago

Bo98 commented 8 years ago

Currently, if an app/config directory already exists, app/config-sample would copy the directory so that it would leave app/config/config-sample and thus not copy properly.

The first commit changes this so it copies the files so that this does not happen.

The second commit is one for backwards compatibility in case someone relied on the broken behaviour to store their modified config files, or perhaps prefer to have their own copy of the config and not allow changes to a default config value to go unnoticed when using a system like OpenShift (see below).

The point of this pull request was to allow something like this:

in an environment like OpenShift. After this pull request you can simply pull this repository, add config changes to app/config/production/ (or the equivalent env in use). Configs in this directory fall back to the files in the root app/config/ so you only need to specify changes to configs rather than copying the whole thing. This is great for running under different environments.

In OpenShift, each commit to the app repository wipes the copy on the server and thus the config directory. If you have committed config changes in the structure above, you would be left with:

All configs under app/config/config-samples/ will not load (unless you set your env as such), and thus the default configs will not load. This pull requests fixes this.

GenPage commented 8 years ago

Thank you for the extensive details surrounding the changes you submitted but the base branch (dev) has been changed to remove this functionality (It was an old attempt at Windows support). If you wish to resubmit the functionality again, please let us know.