Add --use-env-proxy to NODE_OPTIONSΒ #59100
Copy link
Copy link
Closed
Description
Activity
As for precedence, I suggest taking the value of NODE_USE_ENV_PROXY first if present, then fall back to --use-env-proxy.
For consistency, we should probably go with the other way around - this is what we do for several options like
NODE_PENDING_DEPRECATION/--pending-deprecation,NODE_PRESERVE_SYMLINKS/--preserve-symlinksetc.Reacted by silverwindRight, stick to existing precedence.
- added a commit that references this issue
on Jul 26, 2025
Metadata
Metadata
Assignees
Labels
No labels
#57165 added the
NODE_USE_ENV_PROXYenvironment variable, but the problem with such a variable is that it can not be controlled by the script itself via hashbang without writing intoprocess.envwhich is dirty and not guaranteed to work depending on the implementation.Therefor I suggest to also support it as a CLI flag
--use-env-proxyand viaNODE_OPTIONS=--use-env-proxy, enabling such hashbangs:As for precedence, I suggest taking the value of
NODE_USE_ENV_PROXYfirst if present, then fall back to--use-env-proxy.