Fixes 16684: swap the order in the root.user and no.java.home checks.
authorJuan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Thu, 07 Apr 2011 12:54:22 +0200
changeset 11543 e2556cfac1b6
parent 11542 c6571cdea5b0
child 11544 db4e342ac247
Fixes 16684: 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	Thu Apr 07 12:41:22 2011 +0200
+++ b/build.xml	Thu Apr 07 12:54:22 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">