1.2.0 permalink Arrow_down_16x16
  • (-main & [task-name & args])
  • (-main)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source leiningen/core.clj:97 top

(defn -main
  ([& [task-name & args]]
     (let [task-name (or (@aliases task-name) task-name "help")
           args (if (@no-project-needed task-name)
                  (conj args (read-project)))
           compile-path (:compile-path (first args))]
       (when compile-path (.mkdirs (File. compile-path)))
       (binding [*compile-path* compile-path]
         ;; TODO: can we catch only task-level arity problems here?
         ;; compare args and (:arglists (meta (resolve-task task)))?
         (let [task (resolve-task task-name)
               value (apply task args)]
           (when (integer? value)
             (System/exit value))))))
  ([] (apply -main (or *command-line-args* ["help"]))))
Vars in leiningen.core/-main: *command-line-args* apply binding defn integer? let or when
Used in 0 other vars

Comments top

No comments for -main. Log in to add a comment.