Commit 8a29f13
util: fix parseEnv incorrectly splitting multiple ‘=‘ in value
Previously, parseEnv would create multiple environment
variables if a single line contained multiple ‘=‘ characters
(e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }).
This commit ensures that only the first ‘=‘ is used as
the key-value delimiter, and the rest of the line is treated
as the value.
Fixes: #57411
PR-URL: #57421
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 077d502 commit 8a29f13
File tree
5 files changed
+38
-8
lines changed- benchmark/fixtures
- src
- test
- fixtures/dotenv
- parallel
5 files changed
+38
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| |||
199 | 208 | | |
200 | 209 | | |
201 | 210 | | |
202 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
203 | 214 | | |
204 | 215 | | |
205 | 216 | | |
| |||
220 | 231 | | |
221 | 232 | | |
222 | 233 | | |
223 | | - | |
| 234 | + | |
224 | 235 | | |
225 | 236 | | |
226 | 237 | | |
| |||
230 | 241 | | |
231 | 242 | | |
232 | 243 | | |
233 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
234 | 248 | | |
| 249 | + | |
| 250 | + | |
235 | 251 | | |
236 | 252 | | |
237 | 253 | | |
| |||
247 | 263 | | |
248 | 264 | | |
249 | 265 | | |
250 | | - | |
| 266 | + | |
| 267 | + | |
251 | 268 | | |
252 | 269 | | |
253 | 270 | | |
254 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
255 | 278 | | |
256 | 279 | | |
257 | | - | |
258 | | - | |
| 280 | + | |
259 | 281 | | |
260 | 282 | | |
261 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
0 commit comments