Repository navigation
Commit 3b1abb1
committed
fix: handle double quotes inside single-quoted GYP strings
parseConfigGypi() converted single quotes to double quotes with a bare
`config.replace(/'/g, '"')`, which produced invalid JSON when a
single-quoted string contained double-quote characters, such as the GYP
condition strings used by native addons (e.g. `'OS=="win"'`). Convert
each single-quoted string individually and escape the double quotes
inside it instead.
Fixes: #3333
Signed-off-by: Paul Bouchon <mail@bitpshr.net>1 parent ef586e1 commit 3b1abb1
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
0 commit comments