Dont loose settings after externally editing
See original GitHub issueIf you change settings (i.e. by editor) so that the settings file does not contain valid JSON electron-settings empties the settings file 😦
I would appreciate electron-settings distinguishes parsing errors from file access errors!
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Making image adjustments with an external editor - Capture One
Once saved, adjustments made to the image using the external editor are updated and displayed in Capture One.
Read more >How to Edit Videos from an External Drive - YouTube
DON'T LET FCPX LIBRARIES TAKE UP ALL YOUR DRIVE SPACE | How to Edit Videos from an External Drive. Watch later. Share. Copy...
Read more >How to Use External Editors in Lightroom - Photography Life
Useful if you want to compare results. Select “Edit Original” if you want external editor to overwrite the original file within Lightroom.
Read more >Control when external references (links) are updated
Go to Data > Queries & Connections > Edit Links. Click Startup Prompt. Select from one of the following three options: Let users...
Read more >Recover catalog and images after resetting preferences
Write down the name and location of your current catalog before you reset your preferences. In Lightroom, choose Edit > Catalog Settings > ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@nathanbuchar Instead of emptying the invalid file, throwing an “invalid JSON” error and not retrieving data from settings (as there is none because the file is invalid) would be a cleaner solution.
I’m not sure whether I understood you right. My intention is to make my App fail gracefully if the settings contain invalid data.
My App only reads the settings. It’s not required to change the settings by the App itself but by using an editor. If the service personal changes a setting it’s required that the App do not start-up but fail with displaying a descriptive message. I would implement this by catching a JSON parsing exception.