Skip to content

Commit

Permalink
[Truffle] Set ENV['HOME'] on Windows if not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed May 7, 2015
1 parent b1185e0 commit 2b396cd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions truffle/src/main/ruby/core/shims.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,15 @@ def printf(fmt, *args)
end

end

# Windows probably doesn't have a HOME env var, but Rubinius requires it in places, so we need
# to construct the value and place it in the hash.
unless ENV['HOME']
if ENV['HOMEDRIVE']
ENV['HOME'] = if ENV['HOMEPATH']
ENV['HOMEDRIVE'] + ENV['HOMEPATH']
else
ENV['USERPROFILE']
end
end
end

0 comments on commit 2b396cd

Please sign in to comment.