[Ironruby-core] $HOME
Peter Bacon Darwin
bacondarwin at googlemail.com
Mon Jul 28 09:07:17 EDT 2008
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>
More information about the Ironruby-core
mailing list