You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if you want to change one of the options in clicraft.conf you have to also uncomment the default values for any other options it uses. eg, if you want to edit START_COMMAND you must also uncomment SERVER_JAR and SERVER_DIR for it to work.
Not doing so leads to minecraft not starting and no helpful error message is given to the user or even any indication that it has failed when running clicraft start and rc.d in archlinux reporting it has successfully started when it hasn't (though this is another issue).
I would expect clicraft.conf to be pass the default values to/set them before it is read so that there is no need to uncomment values that you haven't changed.
The text was updated successfully, but these errors were encountered:
This is a chicken-and-egg problem that I've grappled with a bit in commits 7d0ab41 and 63a1c6a.
The issue is that if you do things the other way and set the default values for options before reading in clicraft.conf, then for any option you change, you also need to uncomment all other options that use it. e.g. if you want to edit SERVER_DIR you must also uncomment SERVER_JAR, START_COMMAND, and DOWNLOAD_COMMAND.
I'm not sure what the best way to resolve this is.
I will have a look into this problem next week when I have a bit of time see if there is a better way to handle it. Though I haven't thought of one yet that wouldn't cause the problems you mentioned.
I think the worst case we should add a comment to clicraft.conf to tell users they must uncomment all linked variables or possibly leave them uncommented with the default values in the example. This way they know of the problem, or I think is a better situation, if they want to change the values then they will copy the example config and edit what they want without needing to worry about possible problems of not uncommenting the values that haven't changed.
As suggested by Michael Daffin in issue #7, uncomment the options in
clicraft.conf and add a warning so that users don't accidentally
set garbage options due to uninitialized default values.
Due to this change, `clicraft edit` also had to be modified to check
for changes instead of non-comments before creating a new file from
a template.
This is (hopefully) a stop-gap solution until a proper one can be
found.
Currently if you want to change one of the options in clicraft.conf you have to also uncomment the default values for any other options it uses. eg, if you want to edit START_COMMAND you must also uncomment SERVER_JAR and SERVER_DIR for it to work.
Not doing so leads to minecraft not starting and no helpful error message is given to the user or even any indication that it has failed when running clicraft start and rc.d in archlinux reporting it has successfully started when it hasn't (though this is another issue).
I would expect clicraft.conf to be pass the default values to/set them before it is read so that there is no need to uncomment values that you haven't changed.
The text was updated successfully, but these errors were encountered: