-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
settings.load
into separate parts.
- getSettings: just return the current settings - createSettings: create a new settings object, based on defaults and any deployment profiles (and save it) - load: Either call createSettings if there's no settings.json, otherwise load it. Set-up code common to both `load` and `createSettings` has been pulled out into a separate function `finishConfiguringSettings`, which does any sanity-checking and merges in any locked-field settings. The `getSettings` call is made to return the current settings from the main process, which can't send a message requesting them. Now the only place `settings.load` is called is during startup in `background.ts`. And now the unit tests can simply call `createSettings` which will read in the current deployment profile, no need to do an artificial `settings.clear()`. Signed-off-by: Eric Promislow <epromislow@suse.com>
- Loading branch information
1 parent
015cd39
commit 9ac345b
Showing
5 changed files
with
78 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters