Skip to content

Commit

Permalink
Move -main to leiningen.core.main.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Jan 16, 2012
1 parent 1e7f948 commit d8190b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 44 deletions.
7 changes: 2 additions & 5 deletions bin/lein
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ LEIN_USER_PLUGIN_PATH="$(echo "$(unique_user_plugins)" | tr \\n :)"
CLASSPATH="$CLASSPATH:$LEIN_PLUGIN_PATH:$LEIN_USER_PLUGIN_PATH:test/:src/:resources/"
LEIN_JAR="$LEIN_HOME/self-installs/leiningen-$LEIN_VERSION-standalone.jar"
CLOJURE_JAR="$HOME/.m2/repository/org/clojure/clojure/1.3.0/clojure-1.3.0.jar"
NULL_DEVICE=/dev/null

# apply context specific CLASSPATH entries
if [ -f .lein-classpath ]; then
Expand Down Expand Up @@ -197,7 +196,6 @@ else
CLOJURE_JAR=`cygpath -w "$CLOJURE_JAR"`
ORIGINAL_PWD=`cygpath -w "$ORIGINAL_PWD"`
CLASSPATH=`cygpath -wp "$CLASSPATH"`
NULL_DEVICE=NUL
fi

if [ $DEBUG ]; then
Expand Down Expand Up @@ -242,8 +240,7 @@ else
$JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client \
$LEIN_JVM_OPTS -Dleiningen.original.pwd="$ORIGINAL_PWD" \
-Dleiningen.trampoline-file=$TRAMPOLINE_FILE -cp "$CLASSPATH" \
$JLINE clojure.main -e "(use 'leiningen.core)(-main)" \
$NULL_DEVICE "$@"
$JLINE clojure.main -m leiningen.core.main "$@"
if [ -r $TRAMPOLINE_FILE ]; then
TRAMPOLINE="$(cat $TRAMPOLINE_FILE)"
rm $TRAMPOLINE_FILE
Expand All @@ -254,7 +251,7 @@ else
# -Xbootclasspath/a:"$CLOJURE_JAR"
exec $RLWRAP $JAVA_CMD -client \
$LEIN_JVM_OPTS -Dleiningen.original.pwd="$ORIGINAL_PWD" \
-cp "$CLASSPATH" $JLINE clojure.main -m leiningen.main "$@"
-cp "$CLASSPATH" $JLINE clojure.main -m leiningen.core.main "$@"
fi
test $CYGWIN_JLINE && stty icanon echo
fi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns leiningen.main
(ns leiningen.core.main
(:require [leiningen.core.user :as user]
[leiningen.core.project :as project]
[clojure.java.io :as io]
Expand Down Expand Up @@ -37,7 +37,7 @@
not-found))))
([task] (resolve-task task #'task-not-found)))

(defn matching-arity? [task args]
(defn ^:internal matching-arity? [task args]
(some (fn [parameters]
(and (if (= '& (last (butlast parameters)))
(>= (count args) (- (count parameters) 3))
Expand Down
37 changes: 0 additions & 37 deletions test/leiningen/test/main.clj

This file was deleted.

0 comments on commit d8190b1

Please sign in to comment.