Skip to content

Instantly share code, notes, and snippets.

@tavisrudd
Created January 9, 2012 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tavisrudd/1584992 to your computer and use it in GitHub Desktop.
Save tavisrudd/1584992 to your computer and use it in GitHub Desktop.
debug version of eval-in-subprocess
(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