Commit abd8cdfc authored by Bartosz Sosnowski's avatar Bartosz Sosnowski
Browse files

win, child_process: sanitize env variables

On Windows environment variables are case-insensitive. When spawning
child process certain apps can get confused if some of the variables are
duplicated.

This adds a step on Windows to normalizeSpawnArguments that removes such
duplicates, keeping only the first (in lexicographic order) entry in the
env key of options. This is partly already done for the PATH entry.

Fixes: https://github.com/nodejs/node/issues/35129

PR-URL: https://github.com/nodejs/node/pull/35210


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarDenys Otrishko <shishugi@gmail.com>
parent e36ffb72
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment