Fixes 16685: swap the order in the root.user and no.java.home checks.
authorJuan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Thu, 07 Apr 2011 12:55:31 +0200
changeset 9346 b4b65665f2f1
parent 9345 6fe764e7b343
child 9347 1d7dfcf437a7
Fixes 16685: swap the order in the root.user and no.java.home checks.

Some Linux systems don't have JAVA_HOME set for the root user.
When a user runs ant commands in these cases they get an
error about the JAVA_HOME not being set, but the real cause
is that they're running the command as root. Hence the order
swapping.
build.xml
--- a/build.xml	Mon Apr 04 18:20:23 2011 +0200
+++ b/build.xml	Thu Apr 07 12:55:31 2011 +0200
@@ -329,8 +329,8 @@
   <taskdef resource="axis-tasks.properties" classpathref="project.class.path" />
   
   <target name="init" depends="code.rev">
+    <fail if="root.user" message="Don't run ant tasks with the root user" />
     <fail if="no.java.home" message="The environment variable JAVA_HOME is not set." />
-    <fail if="root.user" message="Don't run ant tasks with the root user" />
   </target>
 
   <target name="code.rev" depends="set.code.rev">