Closed sokripon closed 1 year ago
Thanks for reporting this. Somebody reported a similar issue on another project, but I was dumbfounded where the empty settings file comes from. Your issue explains it.
When does this happen? When installing it through scoop, it creates an empty Settings.dat file for usage in a persistent folder See here.
Do you know why this is necessary? It's not that difficult to implement the workaround that you described, but I'd argue that an empty settings file shouldn't be created in the first place.
It's not that difficult to implement the workaround that you described, but I'd argue that an empty settings file shouldn't be created in the first place.
I made a pull request that implements the workaround of having a JSON parsable file https://github.com/ScoopInstaller/Extras/pull/11493 instead of having an empty file, this fixes this issue.
I made a pull request that implements the workaround of having a JSON parsable file ScoopInstaller/Extras#11493 instead of having an empty file, this fixes this issue.
That's great. Does the file need to exist beforehand for persist
to work?
That's great. Does the file need to exist beforehand for
persist
to work?
As far as I know, yes. The reason for that is as far as I know that scoop would otherwise create a folder with that name and so the workaround in scoop is to create a file beforehand, thats really only an issue when the installed program doesn't comes with the file.
I see, makes sense. In that case, I think your PR for the package metadata is the best way forward. I want to avoid silently ignoring empty settings files because it might also indicate at an issue within the app itself.
By the way, the manifest for YoutubeDownloader looks like this:
And for LightBulb:
Version
2.4.0
Flavor
GUI (Graphical User Interface)
Export format
No response
Details
When the Settings.dat file is not valid JSON, the program will crash when started.
When does this happen? When installing it through scoop, it creates an empty Settings.dat file for usage in a persistent folder See here. This has the issue that when trying to start the program it will just see the unparsable file and crash.
Solutions:
{}
(which is enough for the program to fill in the settings themself and not crash).Steps to reproduce