bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

NullPointerException #91

Closed AshtonKem closed 8 years ago

AshtonKem commented 8 years ago

Running lein-do 0.1.6 and lein-cljsbuild 1.1.2 nets the following error:

 lein doo phantom test once

;; ======================================================================
;; Testing with Phantom:

java.lang.NullPointerException
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
    at java.lang.Runtime.exec(Runtime.java:620)
    at java.lang.Runtime.exec(Runtime.java:485)
    at doo.shell$exec_BANG_.invoke(shell.clj:46)
    at doo.shell$sh.invoke(shell.clj:71)
    at doo.core$run_script.invoke(core.clj:253)
    at user$eval4244$fn__4260.invoke(form-init7928453223184035703.clj:1)
    at clojure.core$map$fn__4553.invoke(core.clj:2622)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:507)
    at clojure.core$seq__4128.invoke(core.clj:137)
    at clojure.core$every_QMARK_.invoke(core.clj:2549)
    at user$eval4244.invoke(form-init7928453223184035703.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6782)
    at clojure.lang.Compiler.eval(Compiler.java:6772)
    at clojure.lang.Compiler.load(Compiler.java:7227)
    at clojure.lang.Compiler.loadFile(Compiler.java:7165)
    at clojure.main$load_script.invoke(main.clj:275)
    at clojure.main$init_opt.invoke(main.clj:280)
    at clojure.main$initialize.invoke(main.clj:308)
    at clojure.main$null_opt.invoke(main.clj:343)
    at clojure.main$main.doInvoke(main.clj:421)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Subprocess failed

I'm running on OSX with Phantomjs 2.0.0 Installed.

bensu commented 8 years ago

Hi @AshtonKem, thanks for the report.

The cljsbuild version shouldn't matter. Can you provide an example repository or at least a project.clj?

AshtonKem commented 8 years ago

Here's the minimal project.clj that still reproduced the error:

(defproject foo/my-sample-project "0.1"
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ;; Om + Cljs
                 [org.clojure/clojurescript "1.7.170"]
                 [org.omcljs/om "1.0.0-alpha22" ]
                 [figwheel-sidecar "0.5.0-SNAPSHOT"]]
  :cljsbuild {:builds [{:id "test"
                        :source-paths ["src-cljs" "test-cljs"]
                        :compiler {:main foo.run-tests
                                   :optimizations :none}}]}
  :profiles {:dev      {:plugins        [[lein-doo "0.1.6"]
                                         [lein-cljsbuild "1.1.2"]]}})
bensu commented 8 years ago

The compiler options are missing an :output-to. I'll add an assert to improve the error message in case that happens.

AshtonKem commented 8 years ago

Excellent, thank you!