Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'drip'

  • Loading branch information...
commit 1077aa4fd75780b95971023ddd80436b7434aa42 2 parents 6b2412a + 35a01e6
@ninjudd ninjudd authored
Showing with 13 additions and 7 deletions.
  1. +5 −1 bin/lein
  2. +1 −2  bin/lein.bat
  3. +7 −4 src/leiningen/trampoline.clj
View
6 bin/lein
@@ -155,6 +155,10 @@ function download_failed_message {
export JAVA_CMD=${JAVA_CMD:-"java"}
export LEIN_JAVA_CMD=${LEIN_JAVA_CMD:-$JAVA_CMD}
+if [[ "$(basename $LEIN_JAVA_CMD)" == *drip* ]]; then
+ export DRIP_INIT=$(printf -- "-e\n(require 'leiningen.repl)")
+fi
+
# Support $JAVA_OPTS for backwards-compatibility.
export JVM_OPTS="${JVM_OPTS:-"$JAVA_OPTS"}"
@@ -255,13 +259,13 @@ else
fi
exec sh -c "exec $(cat $TRAMPOLINE_FILE)"
else
+ export TRAMPOLINE_FILE
$LEIN_JAVA_CMD \
-client -XX:+TieredCompilation \
$LEIN_JVM_OPTS \
-Dfile.encoding=UTF-8 \
-Dmaven.wagon.http.ssl.easy=false \
-Dleiningen.original.pwd="$ORIGINAL_PWD" \
- -Dleiningen.trampoline-file="$TRAMPOLINE_FILE" \
-cp "$CLASSPATH" \
clojure.main -m leiningen.core.main "$@"
View
3  bin/lein.bat
@@ -189,8 +189,7 @@ if "%1" == "trampoline" (goto RUN_TRAMPOLINE) else (goto RUN_NORMAL)
set "TRAMPOLINE_FILE=%TEMP%\lein-trampoline-%RANDOM%.bat"
%JAVA_CMD% -client %LEIN_JVM_OPTS% ^
-Dleiningen.original.pwd="%ORIGINAL_PWD%" ^
- -Dleiningen.trampoline-file="%TRAMPOLINE_FILE%" ^
- -cp "%CLASSPATH%" clojure.main -e "(use 'leiningen.core.main)(apply -main (map str '(%*)))"
+ -cp "%CLASSPATH%" clojure.main -e "(use 'leiningen.core.main)(apply -main "%TRAMPOLINE_FILE%" (map str '(%*)))"
if not exist "%TRAMPOLINE_FILE%" goto EOF
call "%TRAMPOLINE_FILE%"
View
11 src/leiningen/trampoline.clj
@@ -9,8 +9,11 @@
(def ^:dynamic *trampoline?* false)
+(defn- trampoline-file []
+ (System/getenv "TRAMPOLINE_FILE"))
+
(defn- win-batch? []
- (.endsWith (System/getProperty "leiningen.trampoline-file") ".bat"))
+ (.endsWith (trampoline-file) ".bat"))
(defn- quote-arg [arg]
(format "\"%s\"" arg))
@@ -33,10 +36,10 @@
(defn write-trampoline [project forms deps]
(let [command (trampoline-command-string project forms deps)
- trampoline-file (System/getProperty "leiningen.trampoline-file")]
+ trampoline (trampoline-file)]
(main/debug "Trampoline command:" command)
- (.mkdirs (.getParentFile (io/file trampoline-file)))
- (spit trampoline-file command)))
+ (.mkdirs (.getParentFile (io/file trampoline)))
+ (spit trampoline command)))
(defn ^:higher-order trampoline
"Run a task without nesting the project's JVM inside Leiningen's.
Please sign in to comment.
Something went wrong with that request. Please try again.