-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Open
Labels
processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
Version
25.2.1, 24.11.1
Platform
Windows 11: Microsoft Windows NT 10.0.28000.0 x64
Ubuntu 24: Linux 6.6.87.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 17:08:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
- Set an environment variable with a numeric name.
- Run node.
- Check in
process.envfor that environment variable.
For example, in a Windows Command Prompt:
echo console.log(process.env['386']);console.log(process.env['OTHER']); > test.js
set 386=1
set OTHER=1
node test.js
Produces:
undefined
1
I'm not 100% sure how to set such env vars in bash, but it does repro using PowerShell in Ubuntu:
PS> $env:OTHER=1
PS> $env:386=1
PS> node test.js
undefined
1
How often does it reproduce? Is there a required condition?
100% repro.
What is the expected behavior? Why is that the expected behavior?
The environment variable should be present in process.env - a numeric name is valid and can be set once in Node.
What do you see instead?
The environment variable is missing.
Additional information
No response
Metadata
Metadata
Assignees
Labels
processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.