Closed webdesserts closed 5 years ago
This also applies when saving strings with value that is shorter than the existing one in the file!
Example:
hello = '12345'
Then saving (using confy::store
) with hello='1'
will result in
hello = '1'
45'
This is also fixed by the suggested change in #10
Confy seems to work fine as long as you're adding information to the config file, but as soon as you remove anything from the config, confy breaks. For example, consider the following code:
If you run the above code you will produce the following output as expected:
however if you add the following:
You will instead end up with this syntactically incorrect file:
It seems that confy is just writing on top of the old file without cleaning up any excess lines left over from the last write.
I was able to fix the issue locally by making the following changes: