Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

process.env doc insufficient #6424

Closed
allan-bonadio opened this issue Oct 28, 2013 · 3 comments
Closed

process.env doc insufficient #6424

allan-bonadio opened this issue Oct 28, 2013 · 3 comments

Comments

@allan-bonadio
Copy link

process.env, in the nodejs process page, just tells us to see man 7 environ. Unfortunately that says:

 An array of strings called the environment is made available by execve(2) when a process begins.  By convention these strings have
 the form ``name=value''.  ....

yes, this is the world of old C/Unix; the env is always stored as an array rather than a dictionary (which wasn't easy in those days). with the rule that keys could not contain = characters cuz we all had to parse each string ourselves.

process.env, however, is correctly a dictionary (object). This should be explained. Also, can I write to it by just setting a field? node-inspector lets me do that but that should also be mentioned. You could do both with a simple example like process.env.LANG = 'en_US'

mmalecki added a commit to mmalecki/node that referenced this issue Nov 11, 2013
@mmalecki
Copy link

@allan-bonadio I added some docs in #6496, what do you think?

@bradisbell
Copy link

Can @mmalecki 's pull be merged in? If it isn't going to be merged (see the pull comments), please reject it and I'll take a crack at it. The doc is not useful in its current state.

@allan-bonadio
Copy link
Author

This looks great, thanks!

mscdex pushed a commit to mscdex/node that referenced this issue Dec 25, 2014
Fixes nodejs#6424.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants