Skip to content

Commit

Permalink
Don't cache compiled code if HOME isn't set.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed May 2, 2012
1 parent d5be52f commit 1651b50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/compiler/compiler.rb
Expand Up @@ -50,6 +50,10 @@ def self.compiled_name(file)
dir = Rubinius::OS_STARTUP_DIR
db = "#{dir}/.rbx"
unless name.prefix?(dir) and compiled_cache_writable?(db, dir)
# Yes, this retarded shit is necessary because people actually
# run under fucked environments with no HOME set.
return unless ENV["HOME"]

dir = File.expand_path "~/"
db = "#{dir}/.rbx"
return unless compiled_cache_writable?(db, dir)
Expand Down

0 comments on commit 1651b50

Please sign in to comment.