ENV["USER"] and ENV["HOME"] may be undefined on Windows
-------------------------------------------------------
Key: JRUBY-5054
URL: http://jira.codehaus.org/browse/JRUBY-5054
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules, Windows
Affects Versions: JRuby 1.6
Environment: Windows
Reporter: Hiro Asari
In my case, in CMD.exe, I see:
MRI:
{noformat}
C:\Users\asari\Documents\Development\jruby>ruby -v -e "p ENV.keys.grep
/HOME|USER/"
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]
-e:1: warning: ambiguous first argument; put parentheses or even spaces
["ALLUSERSPROFILE", "ANT_HOME", "HOME", "HOMEDRIVE", "HOMEPATH", "JAVA_HOME",
"USER", "USERDOMAIN", "USERNAME", "USERPROFILE"]
{noformat}
JRuby:
{noformat}
C:\Users\asari\Documents\Development\jruby>bin\jruby -e "p ENV.keys.sort.grep
/HOME|USER/"
["ALLUSERSPROFILE", "ANT_HOME", "HOMEDRIVE", "HOMEPATH", "JAVA_HOME",
"USERDOMAIN", "USERNAME", "USERPROFILE"]
{noformat}
Cygwin-like environment sets the environment variable {{HOME}}, but not
{{USER}}, as far as I can tell.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email