1diff --git a/src/main/settings.ts b/src/main/settings.ts
2index 6fad97f..dfc64e3 100644
3--- a/src/main/settings.ts
4+++ b/src/main/settings.ts
5@@ -26,8 +26,12 @@ function loadSettings<T extends object = any>(file: string, name: string) {
6
7 const store = new SettingsStore(settings);
8 store.addGlobalChangeListener(o => {
9- mkdirSync(dirname(file), { recursive: true });
10- writeFileSync(file, JSON.stringify(o, null, 4));
11+ try {
12+ mkdirSync(dirname(file), { recursive: true });
13+ writeFileSync(file, JSON.stringify(o, null, 4));
14+ } catch (e) {
15+ console.error("Nix: Failed to write settings.", e);
16+ }
17 });
18
19 return store;