Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.yml false is interpreted as true #1

Open
mbalandis opened this issue Jan 13, 2024 · 3 comments
Open

config.yml false is interpreted as true #1

mbalandis opened this issue Jan 13, 2024 · 3 comments

Comments

@mbalandis
Copy link

/etc/syncplay/config.yml when written it reads Booleans as flags so if you set it is becomes true regardless. Took me a good hour to figure out why chat is disabled even if I set to: disable-chat: false. So it needs to be omitted unless you want the value to be true.

Not a big deal but can be confusing as it is not properly read in code.

Below will be persistent, enabled stats and tls even if I set it to false and disable-chat will be disabled if I uncomment it. Strings work fine.

salt: '?8oyRLMHWTgt'
random-salt: true
password: '1234567'
persistent: true 
enable-stats: true
enable-tls: true
# disable-chat: false
@dnomd343
Copy link
Owner

Sorry, this is indeed a logical error. In the initial command line options, there are only two concepts of "existence" and "absence", that is, the --disable-chat field, but in the configuration file, we specified through a Boolean value, there will be a problem with the logic at this time.

I will submit the fix later and update the corresponding docker image.

I will add pytest code in the future to catch similar errors.

dnomd343 added a commit that referenced this issue Jan 17, 2024
@dnomd343
Copy link
Owner

The new version of docker image has fixed this problem.

@mbalandis
Copy link
Author

The new version of docker image has fixed this problem.

Good stuff, Thank You!

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

No branches or pull requests

2 participants