Repository navigation
Commit 79a5962
fix(server): theme files saved with a UTF-8 BOM are published instead of rejected
A theme JSON file that starts with a UTF-8 byte-order mark is skipped by the themes
watcher and refused by `t3 theme set <file>` as "not a valid theme file". The guarded
theme reader decoded bytes with Buffer#toString, which keeps the BOM, so JSON.parse
failed. settings.json, keybindings.json and t3.json read through FileSystem.readFileString,
whose TextDecoder drops the BOM, so the same JSON loads there.
The theme reader now decodes with TextDecoder too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 0f4a130 commit 79a5962
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
0 commit comments