-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix all fragments not loading when one is badly formed (#11346)
This commit introduces a number of poor abstractions to split `SettingsLoader::_parse` into `_parse` for content in the format of the user's settings.json and `_parseFragment` which is specialized for fragment files. The latter suppresses exceptions and supports the "updates" key for profiles. ## PR Checklist * [x] Closes #11330 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Wrote the following to `%LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\test\test.json`: ```json { "profiles": [ { "name": "bad", "unfocusedAppearance": "" }, { "name": "good" }, { "updates": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "background": "#333" } ] } ``` * Ensured that "bad" is ignored ✔️ * Ensured that "good" shows up and works ✔️ * Ensured that the pwsh profile has a gray background ✔️
- Loading branch information
Showing
2 changed files
with
113 additions
and
53 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