Created
January 9, 2012 21:20
-
-
Save tavisrudd/1584992 to your computer and use it in GitHub Desktop.
debug version of eval-in-subprocess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn eval-in-subprocess [project form-string] | |
(let [command `(~(or (System/getenv "JAVA_CMD") "java") | |
"-cp" ~(get-classpath-string project) | |
~@(get-jvm-args project) | |
"clojure.main" "-e" ~form-string)] | |
(let [cp (get-classpath-string project)] | |
(println (type cp) ": " cp)) | |
(println "---") | |
(let [args (get-jvm-args project)] | |
(println (type args) ": " args)) | |
(println "---") | |
(println (type form-string) form-string) | |
(println "---") | |
(apply sh command))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment