There has been a bug in my program that has caused lots of issues with package managers. When my program starts up, it reads a config file. If the file does not exist, it will create and write the file with some default data, then read it again. Unfortunately when reading the file immediately after writing it, it always returns an empty string (and causes serde to fail).
I was able to replicate the bug in this playground:
How can I fix this?