Commit 2f01c1b
committed
fix: prevent unicode escaping in settings.local.json
Go's json.Marshal escapes `>` as `\u003e` by default (HTML escaping).
Use json.Encoder.SetEscapeHTML(false) to preserve literal characters
in hook commands like `2>/dev/null`.
Fixes hook creation bug where Claude Code rejected the settings file
due to unicode-escaped characters in command strings.
Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>1 parent b9d4fde commit 2f01c1b
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | | - | |
| 176 | + | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| |||
0 commit comments