Update base config logging, removal, and tests
This commit is contained in:
parent
5a3c9c7332
commit
d9b951bfcb
4 changed files with 322 additions and 75 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2017-2020 Signal Messenger, LLC
|
||||
// Copyright 2017-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { join } from 'path';
|
||||
|
@ -34,7 +34,11 @@ console.log(`userData: ${app.getPath('userData')}`);
|
|||
const userDataPath = app.getPath('userData');
|
||||
const targetPath = join(userDataPath, 'config.json');
|
||||
|
||||
export const userConfig = start('user', targetPath);
|
||||
export const userConfig = start({
|
||||
name: 'user',
|
||||
targetPath,
|
||||
throwOnFilesystemErrors: true,
|
||||
});
|
||||
|
||||
export const get = userConfig.get.bind(userConfig);
|
||||
export const remove = userConfig.remove.bind(userConfig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue