Author: djspiewak
Date: Fri Jun 19 22:04:12 2009
New Revision: 786687

URL: http://svn.apache.org/viewvc?rev=786687&view=rev
Log:
Should check to make sure SCALA_HOME is valid

Modified:
    buildr/trunk/lib/buildr/scala/compiler.rb

Modified: buildr/trunk/lib/buildr/scala/compiler.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/compiler.rb?rev=786687&r1=786686&r2=786687&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/compiler.rb (original)
+++ buildr/trunk/lib/buildr/scala/compiler.rb Fri Jun 19 22:04:12 2009
@@ -75,7 +75,13 @@
     
     class << self
       def scala_home
-        @home ||= ENV['SCALA_HOME']
+        env_home = ENV['SCALA_HOME']
+        
+        @home ||= (if !env_home.nil? && File.exists?(env_home + 
'/lib/scala-library.jar') && File.exists?(env_home + '/lib/scala-compiler.jar')
+          env_home
+        else
+          nil
+        end)
       end
       
       def installed?


Reply via email to