Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Invalid settings.yml resets the whole file #51

Closed
tlaundal opened this issue May 24, 2016 · 4 comments
Closed

Invalid settings.yml resets the whole file #51

tlaundal opened this issue May 24, 2016 · 4 comments

Comments

@tlaundal
Copy link

I just tried configuring the plugin, and after going through the whole plugins/ChatControl/settings.yml file, I made a small mistake by missing quotation marks around a message (The message began with §), and the plugin 'fixed' this by resetting the whole file.

When a formatting error occurs, I think the plugin should either just shut down, or backup the original file before trying to fix the problem.

Plugin version: v6.9.3
Server version: git-Paper-754 (MC: 1.9.4) (Implementing API version 1.9.4-R0.1-SNAPSHOT)

@EvilOlaf
Copy link
Contributor

Or cancel the reload and use the old (cached) and valid settings. However if the the server gets restarted with invalid settings it needs to fall back on the default settings.
As written above the invalid file could be backed up though.

@tlaundal
Copy link
Author

Just to make it clear, I was starting the server with an incorrectly formated settings.yml, not reload. I do think the plugin would have reacted in the same way either way, though.

When the plugin registered the error, it printed all the fields from the config with their new/reset values in the console. This wasn't very helpful, though, as it didn't print the values I had written, only the ones it reset them to.

@kangarko kangarko added the bug label May 26, 2016
@kangarko
Copy link
Owner

kangarko commented May 26, 2016

By default, when an error is caught, an error message is supposed to be printed into the console, preventing plugin from starting at all, so the user is encouraged to fix it before loading such a malformed version.

But dear, hours spent on that system and you are telling me that? :) I see. Confirmed & fixed. Thanks for reporting.

A new release will be available soon, I just need to push some more changes so I won't waste release numbers before we hit 7.0.0.

@kangarko
Copy link
Owner

kangarko commented Jun 4, 2016

Forgot to close the issue.

@kangarko kangarko closed this as completed Jun 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants