forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r505564 - /forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java
Date Fri, 09 Feb 2007 23:51:52 GMT
Author: rgardler
Date: Fri Feb  9 15:51:51 2007
New Revision: 505564

URL: http://svn.apache.org/viewvc?view=rev&rev=505564
Log:
If no home directory specified use current working directory

Modified:
    forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java

Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java?view=diff&rev=505564&r1=505563&r2=505564
==============================================================================
--- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java (original)
+++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/Cli.java Fri Feb
 9 15:51:51 2007
@@ -29,7 +29,13 @@
      */
     public static void main(String[] args) {
         System.out.println("--- Dispatcher CLI ---");
-        final String home = args[0];
+        final String home;
+        if (args.length == 0) {
+            // no home directory specified so use the current working directory
+            home = System.getProperty("user.dir");
+        } else {
+            home  = args[0];
+        }
         System.out.println("home: "+home);
         propertiesHelper = new DispatcherPropertiesHelper(home);
         String sourceUrl;



Mime
View raw message