By the way, this is how $HOME is setup in mspec (on Windows):
# Code to setup HOME directory correctly on Windows
# This duplicates Ruby 1.9 semantics for defining HOME
platform_is :windows do
if ENV[''HOME'']
ENV[''HOME''] = ENV[''HOME''].tr
''\\'', ''/''
elsif ENV[''HOMEDIR''] &&
ENV[''HOMEDRIVE'']
ENV[''HOME''] =
File.join(ENV[''HOMEDRIVE''], ENV[''HOMEDIR''])
elsif ENV[''HOMEDIR'']
ENV[''HOME''] = ENV[''HOMEDIR'']
elsif ENV[''HOMEDRIVE'']
ENV[''HOME''] = ENV[''HOMEDRIVE'']
elsif ENV[''USERPROFILE'']
ENV[''HOME''] = ENV[''USERPROFILE'']
else
puts "No suitable HOME environment found. This means that all of
HOME, HOMEDIR, HOMEDRIVE, and USERPROFILE are not set"
exit 1
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080728/65b907fc/attachment.html>
That''s wrong. The order should be: HOME USERPROFILE HOMEDRIVE + HOMEDIR Using HOMEDIR without HOMEDRIVE (and the opposite) are bad ideas. On Mon, Jul 28, 2008 at 6:07 AM, Peter Bacon Darwin < bacondarwin at googlemail.com> wrote:> By the way, this is how $HOME is setup in mspec (on Windows): > > > > # Code to setup HOME directory correctly on Windows > > # This duplicates Ruby 1.9 semantics for defining HOME > > platform_is :windows do > > if ENV[''HOME''] > > ENV[''HOME''] = ENV[''HOME''].tr ''\\'', ''/'' > > elsif ENV[''HOMEDIR''] && ENV[''HOMEDRIVE''] > > ENV[''HOME''] = File.join(ENV[''HOMEDRIVE''], ENV[''HOMEDIR'']) > > elsif ENV[''HOMEDIR''] > > ENV[''HOME''] = ENV[''HOMEDIR''] > > elsif ENV[''HOMEDRIVE''] > > ENV[''HOME''] = ENV[''HOMEDRIVE''] > > elsif ENV[''USERPROFILE''] > > ENV[''HOME''] = ENV[''USERPROFILE''] > > else > > puts "No suitable HOME environment found. This means that all of > HOME, HOMEDIR, HOMEDRIVE, and USERPROFILE are not set" > > exit 1 > > end > > end > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-- http://bradwilson.typepad.com/ http://social.zune.net/member/AgilistBrad http://www.flickr.com/photos/dotnetguy/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080728/12e2eaa8/attachment.html>
So the question is, ?Given that this is in mspec and it claims to reproduce Ruby
1.9 semantic, who do we send the bug report to??
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Brad Wilson
Sent: Monday,28 July 28, 2008 23:18
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] $HOME
That''s wrong.
The order should be:
HOME
USERPROFILE
HOMEDRIVE + HOMEDIR
Using HOMEDIR without HOMEDRIVE (and the opposite) are bad ideas.
On Mon, Jul 28, 2008 at 6:07 AM, Peter Bacon Darwin <bacondarwin at
googlemail.com> wrote:
By the way, this is how $HOME is setup in mspec (on Windows):
# Code to setup HOME directory correctly on Windows
# This duplicates Ruby 1.9 semantics for defining HOME
platform_is :windows do
if ENV[''HOME'']
ENV[''HOME''] = ENV[''HOME''].tr
''\\'', ''/''
elsif ENV[''HOMEDIR''] &&
ENV[''HOMEDRIVE'']
ENV[''HOME''] =
File.join(ENV[''HOMEDRIVE''], ENV[''HOMEDIR''])
elsif ENV[''HOMEDIR'']
ENV[''HOME''] = ENV[''HOMEDIR'']
elsif ENV[''HOMEDRIVE'']
ENV[''HOME''] = ENV[''HOMEDRIVE'']
elsif ENV[''USERPROFILE'']
ENV[''HOME''] = ENV[''USERPROFILE'']
else
puts "No suitable HOME environment found. This means that all of
HOME, HOMEDIR, HOMEDRIVE, and USERPROFILE are not set"
exit 1
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080729/dd78d0ec/attachment-0001.html>
Ruby 1.9 actually uses this order:
HOME
HOMEDRIVE + HOMEPATH
HOMEPATH
USERPROFILE
SHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &pidl)
This seems reasonable. I suspect mspec needs tweaking.
Pete
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Brad Wilson
Sent: Monday,28 July 28, 2008 23:18
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] $HOME
That''s wrong.
The order should be:
HOME
USERPROFILE
HOMEDRIVE + HOMEDIR
Using HOMEDIR without HOMEDRIVE (and the opposite) are bad ideas.
On Mon, Jul 28, 2008 at 6:07 AM, Peter Bacon Darwin <bacondarwin at
googlemail.com> wrote:
By the way, this is how $HOME is setup in mspec (on Windows):
# Code to setup HOME directory correctly on Windows
# This duplicates Ruby 1.9 semantics for defining HOME
platform_is :windows do
if ENV[''HOME'']
ENV[''HOME''] = ENV[''HOME''].tr
''\\'', ''/''
elsif ENV[''HOMEDIR''] &&
ENV[''HOMEDRIVE'']
ENV[''HOME''] =
File.join(ENV[''HOMEDRIVE''], ENV[''HOMEDIR''])
elsif ENV[''HOMEDIR'']
ENV[''HOME''] = ENV[''HOMEDIR'']
elsif ENV[''HOMEDRIVE'']
ENV[''HOME''] = ENV[''HOMEDRIVE'']
elsif ENV[''USERPROFILE'']
ENV[''HOME''] = ENV[''USERPROFILE'']
else
puts "No suitable HOME environment found. This means that all of
HOME, HOMEDIR, HOMEDRIVE, and USERPROFILE are not set"
exit 1
end
end
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
--
http://bradwilson.typepad.com/
http://social.zune.net/member/AgilistBrad
http://www.flickr.com/photos/dotnetguy/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080729/fc82ca8d/attachment.html>