Author: peterreilly
Date: Fri Sep 15 15:26:36 2006
New Revision: 446773

URL: http://svn.apache.org/viewvc?view=rev&rev=446773
Log:
Get ant to output a warning if /etc/ant.conf
has modified ANT_HOME


Modified:
    ant/core/trunk/src/script/ant

Modified: ant/core/trunk/src/script/ant
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/script/ant?view=diff&rev=446773&r1=446772&r2=446773
==============================================================================
--- ant/core/trunk/src/script/ant (original)
+++ ant/core/trunk/src/script/ant Fri Sep 15 15:26:36 2006
@@ -44,9 +44,16 @@
   rpm_mode=false
   usejikes=$use_jikes_default
 else
+  orig_ant_home=$ANT_HOME
   # load system-wide ant configuration
   if [ -f "/etc/ant.conf" ] ; then
     . /etc/ant.conf
+  fi
+
+  # Normally users do not expect that /etc/ant.conf will override ANT_HOME
+  if [ -n "$orig_ant_home" -a "$orig_ant_home" != "$ANT_HOME" ] ; then
+    echo "Warning: ANT_HOME has been overridden by /etc/ant.conf from 
$orig_ant_home to $ANT_HOME"
+    echo "         Use ant -noconfig if this is not desired."
   fi
 
   # load user ant configuration



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to