Files
node/lib
Trivikram Kamat 41e9ab96cd watch: escape quotes and backslashes in NODE_OPTIONS
When stripping watch flags, NODE_OPTIONS is tokenized and rejoined
for the child process. Values were only re-quoted if they contained
a space, and nothing inside the quotes was escaped. A value with a
double quote made the child fail with "unterminated string", and a
backslash inside a quoted value was silently dropped.

Quote values that contain a space or a double quote, and escape
backslashes and double quotes inside the quotes, so the child
tokenizes the string back to the same values.

Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5.5
PR-URL: https://github.com/nodejs/node/pull/66363
Fixes: https://github.com/nodejs/node/issues/66362
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-10-06 01:43:12 +02:00
..
2026-09-15 10:49:29 +02:00
2020-02-18 22:15:50 -08:00
2020-10-21 01:26:34 +02:00
2026-09-15 10:49:34 +02:00
2026-09-29 00:25:12 +02:00
2026-09-16 23:37:20 +02:00
2024-01-12 16:09:48 +00:00
2025-12-22 16:14:46 +00:00
2026-08-26 00:56:01 +02:00
2025-09-04 11:58:50 +00:00
2026-05-05 16:19:15 +02:00
2026-08-26 00:56:21 +02:00
2026-09-15 10:49:28 +02:00