buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r687458 - /incubator/buildr/trunk/rakelib/setup.rake
Date Wed, 20 Aug 2008 20:48:24 GMT
Author: assaf
Date: Wed Aug 20 13:48:23 2008
New Revision: 687458

URL: http://svn.apache.org/viewvc?rev=687458&view=rev
Log:
rake setup now complains if JAVA_HOME is missing, and reminds you sudo rake is unnecessary.

Modified:
    incubator/buildr/trunk/rakelib/setup.rake

Modified: incubator/buildr/trunk/rakelib/setup.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/setup.rake?rev=687458&r1=687457&r2=687458&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/setup.rake (original)
+++ incubator/buildr/trunk/rakelib/setup.rake Wed Aug 20 13:48:23 2008
@@ -44,9 +44,9 @@
     fail "#{dep} not found in local or remote repository!" unless spec
     puts "Installing #{spec.full_name} ..."
     args = [rb_bin, '-S', 'gem', 'install', spec.name, '-v', spec.version.to_s]
+    fail "Please set JAVA_HOME first #{'(no need to run as sudo)' if ENV['USER'] == 'root'}"
unless ENV['JAVA_HOME']
     args.unshift('sudo', 'env', 'JAVA_HOME=' + ENV['JAVA_HOME']) unless windows? || ENV['GEM_HOME']
-    args = args.map{|a| a.inspect}.join(' ') if windows?
-    sh *args
+    sh *args.map{ |a| a.inspect }.join(' ')
   end
 end
 



Mime
View raw message