-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Discord's disable breaking updates script breaks if settings.json is invalid #206106
Comments
Hmm, interesting that Discord doesn't launch at all. except JSONDecodeError:
print("[Nix] settings.json is malformed, letting Discord fix itself") Or something like that (Now that I think about it, if the |
Tangentally related: I installed discord on a new machine, and the disable breaking updates script didn't appear to have any effect until I created an empty Also, the only real indication that it was missing is that when I ran |
I'm surprised this is even in tree - I don't think we should be changing program behavior - especially when you're calling it I doubt the majority of the users even knew this was happening outside of those involved in PRs for nixpkgs. This is a matter of convenience like stated in the script that has a trade off causing a degradation in the security of the application - causing users to not update - relying on maintainers to do it. Please create a separate package for this at the same time when fixing this - call it whatever - just not |
I hit this same issue and adding an |
Thanks for opening an issue and describing the fix. This broke for me too and it took me a while to figure out why ... |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/reconsider-reusing-upstream-tarballs/42524/33 |
Describe the bug
Discord's package has a script which disables breaking updates, by looking and modifying the settings.json file.
This script breaks if said
settings.json
exists but is empty (fails to load the JSON object)For some reason all values in this file cleared to me and I encountered this issue.
(tested on NixOS 22.11 but the script hasn't changed in master)
Steps To Reproduce
Steps to reproduce the behavior:
~/.config/discord/settings.json
Expected behavior
disable-breaking-updates.py
should handle the exceptionjson.decoder.JSONDecodeError
which arises from this issue.Screenshots
N/A
Additional context
Some logs of when this happens:
Notify maintainers
@devins2518 @Artturin @Infinidoge
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: