Commits

Meikel Brandmeyer committed e554202

Make task interface more -main like

  • Participants
  • Parent commits 960b72a

Comments (0)

Files changed (2)

File runtime/src/main/java/clojuresque/Driver.java

         final String function  = command.substring(slash + 1);
 
         RT.var("clojure.core", "require").invoke(Symbol.create(namespace));
-        RT.var(namespace, function).invoke(RT.next(RT.seq(args)));
+        RT.var("clojure.core", "apply").invoke(
+                RT.var(namespace, function).deref(),
+                RT.next(RT.seq(args))
+        );
     }
 }

File runtime/src/main/resources/clojuresque/cli.clj

   [name description options & body]
   `(defn ~name
      ~description
-     [args#]
+     [& args#]
      (with-command-line args#
        ~description
        ~options