Skip to content
Browse files

Don't cache compiled code if HOME isn't set.

  • Loading branch information...
1 parent d5be52f commit 1651b501b7e77a6eb8386fa4e3b07cabfef9e4e2 @brixen brixen committed May 2, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/compiler/compiler.rb
View
4 lib/compiler/compiler.rb
@@ -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)

0 comments on commit 1651b50

Please sign in to comment.
Something went wrong with that request. Please try again.